sudo cp sources.list sources.list.bak sudo vim /etc/apt/sources.list
具体内容:
deb http://mirrors.aliyun.com/ubuntu/ xenial main restricted universe multiverse deb http://mirrors.aliyun.com/ubuntu/ xenial-security main restricted universe multiverse deb http://mirrors.aliyun.com/ubuntu/ xenial-updates main restricted universe multiverse deb http://mirrors.aliyun.com/ubuntu/ xenial-backports main restricted universe multiverse ##测试版源 deb http://mirrors.aliyun.com/ubuntu/ xenial-proposed main restricted universe multiverse ## 源码 deb-src http://mirrors.aliyun.com/ubuntu/ xenial main restricted universe multiverse deb-src http://mirrors.aliyun.com/ubuntu/ xenial-security main restricted universe multiverse deb-src http://mirrors.aliyun.com/ubuntu/ xenial-updates main restricted universe multiverse deb-src http://mirrors.aliyun.com/ubuntu/ xenial-backports main restricted universe multiverse ##测试版源 deb-src http://mirrors.aliyun.com/ubuntu/ xenial-proposed main restricted universe multiverse # Canonical 合作伙伴和附加 deb http://archive.canonical.com/ubuntu/ xenial partner deb http://extras.ubuntu.com/ubuntu/ xenial main
/usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/4.8/…/…/…/x86_64-linux-gnu/crti.o: unrecognized relocation (0x2a) in section `.init’ /usr/bin/ld: final link failed: Bad value collect2: error: ld returned 1 exit status
这里提示在链接crti.o时出错,地址不识别,这里多半认为是版本问题
将已经编译过得环境中crti.o替换到主机中,编译通过
说明是gnu lib库有差异
gcc version 4.8.4 (Ubuntu 4.8.4-2ubuntu1~14.04.3)
gcc version 4.8.4 (Ubuntu 4.8.4-2ubuntu1~14.04.4)
处理方案:
在gnu lib中替换crti.o
3.2.4 打包ext4 image错误
错误提示:
make_ext4fs执行时有库找不到
ldd 命令查看链接库:
20201016sumo/src/build/tools$ ldd make_ext4fs
linux-gate.so.1 => (0xf773b000) libstdc++.so.6 => not found
file命令查看make_ext4fs
make_ext4fs: ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.8, not stripped