赞
踩
这几天很是衰,yum不能用,rpm又不小心删除了,那么如何安装rpm呢,网上找到方法是用rpm tar.gz2安装。
安装报错1
checking nspr.h usability... no
checking nspr.h presence... no
checking for nspr.h... no
configure: error: missing required NSPR / NSS header
解决:
./configure --prefix=/usr CPPFLAGS="-I/usr/include/nspr -I/usr/include/nss"(这是在cd rpm解压后的配置,要指定已安装的nspr,nss的位置)
结果:(已找到)
checking nspr.h usability... yes
checking nspr.h presence... yes
checking for nspr.h... yes
checking nss.h usability... yes
checking nss.h presence... yes
checking for nss.h... yes
checking sechash.h usability... no
checking sechash.h presence... no
checking for sechash.h... no
configure: error: missing required NSPR / NSS header
报错2:checking sechash.h usability... no
checking sechash.h presence... no
checking for sechash.h... no
configure: error: missing required NSPR / NSS header
解决:
./configure --prefix=/usr CPPFLAGS="-I/usr/include/nspr -I/usr/include/nss3"(这是在cd rpm解压后的配置,要指定已安装的nspr,nss的位置,nss3是我安装的位置,之前的nss不能用)
结果:
checking nspr.h usability... yes
checking nspr.h presence... yes
checking for nspr.h... yes
checking nss.h usability... yes
checking nss.h presence... yes
checking for nss.h... yes
checking sechash.h usability... yes
checking sechash.h presence... yes
checking for sechash.h... yes
checking for VFY_VerifyDigestDirect in -lnss3... yes
checking for NSS_InitContext in -lnss3... yes
checking magic.h usability... no
checking magic.h presence... no
checking for magic.h... no
configure: error: missing required header magic.h
报错3:
checking magic.h usability... no
checking magic.h presence... no
checking for magic.h... no
configure: error: missing required header magic.h
解决:./configure --prefix=/usr CPPFLAGS="-I/usr/include/nspr -I/usr/include/nss3 -I/usr/include/linux"(magic在usr/include/linux 下)
结果:
checking whether make supports nested variables... yes
checking how to create a pax tar archive... gnutar
checking whether make supports nested variables... (cached) yes
checking for style of include used by make... GNU
checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... configure: error: in `/usr/yumrpm/rpm-4.13.0':
configure: error: cannot run C compiled programs.
If you meant to cross compile, use `--host'.
See `config.log' for more details
问题4:configure: error: cannot run C compiled programs.
If you meant to cross compile, use `--host'.
See `config.log' for more details
解决:
./configure --prefix=/usr --host=x86_64 CPPFLAGS="-I/usr/include/nspr -I/usr/include/nss3 -I/usr/include/linux"
结果:
checking for g++ option to produce PIC... -fPIC -DPIC
checking if g++ PIC flag -fPIC -DPIC works... yes
checking if g++ static flag -static works... no
checking if g++ supports -c -o file.o... yes
checking if g++ supports -c -o file.o... (cached) yes
checking whether the g++ linker (/usr/bin/ld) supports shared libraries... no
checking dynamic linker characteristics... no
checking how to hardcode library paths into programs... immediate
checking for bison... bison -y
checking for gcc option to accept ISO C99... unsupported
configure: error: ISO C99 capable compiler required
安装过程继续解决报错问题:
1.换了一个rpm源码包(github上下载)
2.解决magic.h找不到问题:安装file.tar.gz包( https://lists.freebsd.org/pipermail/freebsd-questions/2005-September/098241.html ftp://ftp.astron.com/pub/file/)
3.解决archive.h找不到问题:安装libarchive.tar.gz( http://www.linuxfromscratch.org/blfs/view/svn/general/libarchive.html)
4.解决configure: error: lua not present (--without-lua to disable)
(http://www.linuxquestions.org/questions/programming-9/rpm-build-syntax-error-near-unexpected-token-%60lua-'-931408/)
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。