libtool: error: ‘/usr/.local/lib/libgmp.la‘ is not a valid libtool archive

背景:
安装gcc时提示需要vc++11,然后安装gcc依赖gmp、mpfr、mpc。
到mpc make时出错:
libtool: error: ‘/usr/.local/lib/libgmp.la’ is not a valid libtool archive
详细:
/usr/bin/grep: /usr/.local/lib/libgmp.la: No such file or directory
/usr/bin/sed: can’t read /usr/.local/lib/libgmp.la: No such file or directory
libtool: error: ‘/usr/.local/lib/libgmp.la’ is not a valid libtool archive
make[2]: *** [Makefile:429: libmpc.la] Error 1
make[2]: Leaving directory ‘/home/openmind/gcc-8.3.0/mpc-1.0.3/src’
make[1]: *** [Makefile:462: all-recursive] Error 1
make[1]: Leaving directory ‘/home/openmind/gcc-8.3.0/mpc-1.0.3’
make: *** [Makefile:373: all] Error 2

原因:
路径不对,configure时指定了prefix参数。

./configure --prefix=$HOME/.local   --with-gmp=$HOME/.local   --with-mpfr=$HOME/.local   LDFLAGS="-L$HOME/.local/lib"   CPPFLAGS="-I$HOME/.local/include"

解决方法:
修改
1.(~/.local/)修改为自己的路径。

vi ~/.local/lib/libgmp.la

2.(/home/xx/.local)修改为自己的路径。

vi /home/xx/.local/lib/libmpfr.la

中的路径为正确的路径。
然后make && install 就OK了。

admin12@admin12-virtual-machine:~/openwrt$ ./scripts/feeds update -a ./scripts/feeds install -a Updating feed 'packages' from 'https://git.openwrt.org/feed/packages.git^65e91999666573eac2d9d57ed4ecadac029cf8f3' ... 正克隆到 './feeds/packages'... remote: Enumerating objects: 225080, done. remote: Counting objects: 100% (225080/225080), done. remote: Compressing objects: 100% (90892/90892), done. error: RPC 失败。curl 56 GnuTLS recv error (-54): Error in the pull function. fetch-pack: unexpected disconnect while reading sideband packet fatal: 过早的文件结束符(EOF) fatal: fetch-pack:无效的 index-pack 输出 failed. Updating feed 'luci' from 'https://git.openwrt.org/project/luci.git^ab22243b4928bd81936f56422970c10192cdad8e' ... 正克隆到 './feeds/luci'... fatal: 无法访问 'https://git.openwrt.org/project/luci.git/':gnutls_handshake() failed: The TLS connection was non-properly terminated. failed. Updating feed 'routing' from 'https://git.openwrt.org/feed/routing.git^83f515d7ae76e5a7460c0eacadae806363df05a1' ... 正克隆到 './feeds/routing'... fatal: 无法访问 'https://git.openwrt.org/feed/routing.git/':gnutls_handshake() failed: The TLS connection was non-properly terminated. failed. Updating feed 'telephony' from 'https://git.openwrt.org/feed/telephony.git^8ecbdabc7c5cadbe571eb947f5cd333a5a785010' ... 正克隆到 './feeds/telephony'... remote: Enumerating objects: 12121, done. remote: Counting objects: 100% (12121/12121), done. remote: Compressing objects: 100% (7482/7482), done. remote: Total 12121 (delta 6806), reused 8135 (delta 4394), pack-reused 0 接收对象中: 100% (12121/12121), 2.48 MiB | 32.00 KiB/s, 完成. 处理 delta 中: 100% (6806/6806), 完成. 切换到一个新分支 '8ecbdabc7c5cadbe571eb947f5cd333a5a785010' /home/admin12/openwrt Create index file './feeds/telephony.index' Checking 'working-make'... ok. Checking 'case-sensitive-fs'... ok. Checking 'proper-umask'... ok. Checking 'gcc'... failed. Checking 'working-gcc'... ok. Checking 'g++'... failed. Checking 'working-g++'... ok. Checking 'ncurses'... ok. Checking 'perl-thread-queue'... ok. Checking 'tar'... ok. Checking 'find'... ok. Checking 'bash'... ok. Checking 'patch'... ok. Checking 'diff'... ok. Checking 'cp'... ok. Checking 'seq'... ok. Checking 'awk'... failed. Checking 'grep'... ok. Checking 'getopt'... ok. Checking 'stat'... ok. Checking 'unzip'... ok. Checking 'bzip2'... ok. Checking 'wget'... ok. Checking 'perl'... ok. Checking 'python3-cleanup'... ok. Checking 'python'... failed. Checking 'git'... ok. Checking 'file'... ok. Checking 'ldconfig-stub'... ok. Build dependency: Please install the GNU C Compiler (gcc) 4.8 or later Build dependency: Please install the GNU C++ Compiler (g++) 4.8 or later Build dependency: Please install GNU 'awk' Build dependency: Please install Python 2.x Prerequisite check failed. Use FORCE=1 to override. gmake: *** [/home/admin12/openwrt/include/toplevel.mk:168:staging_dir/host/.prereq-build] 错误 1 awk: include/scan.awk: line 21: function asort never defined awk: include/scan.awk: line 21: function asort never defined Collecting package info: done awk: include/scan.awk: line 21: function asort never defined awk: include/scan.awk: line 21: function asort never defined Collecting target info: done Checking 'working-make'... ok. Checking 'case-sensitive-fs'... ok. Checking 'proper-umask'... ok. Checking 'gcc'... failed. Checking 'working-gcc'... ok. Checking 'g++'... failed. Checking 'working-g++'... ok. Checking 'ncurses'... ok. Checking 'perl-thread-queue'... ok. Checking 'tar'... ok. Checking 'find'... ok. Checking 'bash'... ok. Checking 'patch'... ok. Checking 'diff'... ok. Checking 'cp'... ok. Checking 'seq'... ok. Checking 'awk'... failed. Checking 'grep'... ok. Checking 'getopt'... ok. Checking 'stat'... ok. Checking 'unzip'... ok. Checking 'bzip2'... ok. Checking 'wget'... ok. Checking 'perl'... ok. Checking 'python3-cleanup'... ok. Checking 'python'... failed. Checking 'git'... ok. Checking 'file'... ok. Checking 'ldconfig-stub'... ok. Build dependency: Please install the GNU C Compiler (gcc) 4.8 or later Build dependency: Please install the GNU C++ Compiler (g++) 4.8 or later Build dependency: Please install GNU 'awk' Build dependency: Please install Python 2.x Prerequisite check failed. Use FORCE=1 to override. gmake[1]: *** [/home/admin12/openwrt/include/toplevel.mk:168: staging_dir/host/.prereq-build] Error 1 gmake: *** [/home/admin12/openwrt/include/toplevel.mk:83:prepare-tmpinfo] 错误 2 Cannot open './tmp/.packageinfo': No such file or directory Can't open file './tmp/.targetinfo': No such file or directory Ignoring feed 'packages' - index missing Ignoring feed 'luci' - index missing Ignoring feed 'routing' - index missing Installing all packages from feed packages. Ignoring feed 'packages' - index missing Installing all packages from feed luci. Ignoring feed 'luci' - index missing Installing all packages from feed routing. Ignoring feed 'routing' - index missing Installing all packages from feed telephony. admin12@admin12-virtual-machine:~/openwrt$
09-20
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值