我从 VMWare 映像中的 64 位PC (AMD64) 桌面映像安装了 Ubuntu 15.04 64 位(我在 win7 64 位下),并尝试在其上构建 gcc 5.2。在配置步骤中,我遇到了一些错误,例如:
/usr/bin/ld: cannot find crt1.o: No such file or directory
/usr/bin/ld: cannot find crti.o: No such file or directory
collect2: ld returned 1 exit status
我猜它们与 32 位库的明显缺失有关。以同样的方式,使用 ubuntus g++ 和-m32
选项编译会导致
/usr/include/c++/4.9/iostream:38:28: fatal error: bits/c++config.h: No such file or directory
#include <bits/c++config.h>
寻找 c++config.h 给了我这个:
/usr/include/x86_64-linux-gnu/c++/4.9/bits/c++config.h
我怀疑 32 个库安装错误,因为我有一个/usr/lib32
只有这个的文件夹:
xx@xx-ubuntu1504vm:/usr/lib32$ ls -l
total 1372
drwxr-xr-x 2 root root 12288 août 20 11:00 gconv
lrwxrwxrwx 1 root root 14 mars 6 2015 libform.so.5 -> libform.so.5.9
-rw-r--r-- 1 root root 68012 mars 6 2015 libform.so.5.9
-rw-r--r-- 1 root root 112708 avril 15 04:06 libgcc_s.so.1
lrwxrwxrwx 1 root root 14 mars 6 2015 libmenu.so.5 -> libmenu.so.5.9
-rw-r--r-- 1 root root 34548 mars 6 2015 libmenu.so.5.9
lrwxrwxrwx 1 root root 15 mars 6 2015 libpanel.so.5 -> libpanel.so.5.9
-rw-r--r-- 1 root root 13584 mars 6 2015 libpanel.so.5.9
lrwxrwxrwx 1 root root 19 avril 14 22:15 libstdc++.so.6 -> libstdc++.so.6.0.20
-rw-r--r-- 1 root root 975360 avril 14 22:51 libstdc++.so.6.0.20
lrwxrwxrwx 1 root root 13 mars 6 2015 libtic.so.5 -> libtic.so.5.9
-rw-r--r-- 1 root root 63160 mars 6 2015 libtic.so.5.9
lrwxrwxrwx 1 root root 13 oct. 27 2014 libz.so.1 -> libz.so.1.2.8
-rw-r--r-- 1 root root 108080 oct. 27 2014 libz.so.1.2.8
在里面。
我能做什么 ?