Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

debian:buster-slim make_rootfs 的镜像体积太大了 #3

Closed
wojiushixiaobai opened this issue May 9, 2023 · 1 comment
Closed

Comments

@wojiushixiaobai
Copy link
Contributor

wojiushixiaobai commented May 9, 2023

image

目录 /usr/lib/loongarch64-linux-gnu 体积增大了很多

root@e42713e957a2:/usr/lib/loongarch64-linux-gnu/loongson# ls -al
total 9624
drwxr-xr-x  7 root root    4096 May  9 02:30 .
drwxr-xr-x 12 root root   12288 May  9 02:30 ..
drwxr-xr-x  2 root root    4096 May  9 02:30 bin
drwxr-xr-x  2 root root    4096 May  9 02:30 dri
drwxr-xr-x  4 root root    4096 Apr 27 10:02 include
drwxr-xr-x  2 root root    4096 May  9 02:30 lib
lrwxrwxrwx  1 root root      24 Apr 27 08:00 libEGL_loongson.so.0 -> libEGL_loongson.so.0.0.0
-rw-r--r--  1 root root  250272 Apr 27 08:00 libEGL_loongson.so.0.0.0
lrwxrwxrwx  1 root root      24 Apr 27 08:00 libGLX_loongson.so.0 -> libGLX_loongson.so.0.0.0
-rw-r--r--  1 root root  660280 Apr 27 08:00 libGLX_loongson.so.0.0.0
lrwxrwxrwx  1 root root      14 Apr 27 08:00 libOSMesa.so -> libOSMesa.so.8
lrwxrwxrwx  1 root root      18 Apr 27 08:00 libOSMesa.so.8 -> libOSMesa.so.8.0.0
-rw-r--r--  1 root root 8479208 Apr 27 08:00 libOSMesa.so.8.0.0
lrwxrwxrwx  1 root root      11 Apr 27 08:00 libgbm.so -> libgbm.so.1
lrwxrwxrwx  1 root root      15 Apr 27 08:00 libgbm.so.1 -> libgbm.so.1.0.0
-rw-r--r--  1 root root   68520 Apr 27 08:00 libgbm.so.1.0.0
lrwxrwxrwx  1 root root      17 Apr 27 08:00 libglapi.so.0 -> libglapi.so.0.0.0
-rw-r--r--  1 root root  346352 Apr 27 08:00 libglapi.so.0.0.0
drwxr-xr-x  2 root root    4096 May  9 02:30 pkgconfig

这个新增的目录里面包含了图形化的一些库和 llvm-config 二进制及相关依赖库,但是 llvm-config 并无法使用,缺少 libedit.so.2 库

root@e42713e957a2:/usr/lib/loongarch64-linux-gnu/loongson# ./bin/llvm-config version
./bin/llvm-config: error while loading shared libraries: libedit.so.2: cannot open shared object file: No such file or directory

我尝试将该目录 (/usr/lib/loongarch64-linux-gnu/loongson)进行移除,移除后在容器里面测试基本的使用没有什么异常,此目录可以精简吗?

# 移除命令如下
rm -rf /usr/lib/loongarch64-linux-gnu/loongson
ldconfig
@wojiushixiaobai
Copy link
Contributor Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant