症状:
[root@localhost System_Sources]# rpm -Uvh libmpfr-2.2.1-3mdv2007.1.src.rpm
warning: libmpfr-2.2.1-3mdv2007.1.src.rpm: V3 DSA signature: NOKEY, key ID 26752624
1:libmpfr warning: user mandrake does not exist - using root
warning: group mandrake does not exist - using root
warning: user mandrake does not exist - using root
warning: group mandrake does not exist - using root
########################################### [100%]
[root@localhost Desktop]# rpm -Uvh yum-3.2.20-4.fc10.src.rpm
warning: yum-3.2.20-4.fc10.src.rpm: V3 DSA signature: NOKEY, key ID 0b86274e
1:yum warning: user mockbuild does not exist - using root
warning: group mockbuild does not exist - using root
warning: user mockbuild does not exist - using root
warning: group mockbuild does not exist - using root
warning: user mockbuild does not exist - using root
warning: group mockbuild does not exist - using root
warning: user mockbuild does not exist - using root
warning: group mockbuild does not exist - using root
warning: user mockbuild does not exist - using root
warning: group mockbuild does not exist - using root
warning: user mockbuild does not exist - using root
warning: group mockbuild does not exist - using root
warning: user mockbuild does not exist - using root
warning: group mockbuild does not exist - using root
warning: user mockbuild does not exist - using root
warning: group mockbuild does not exist - using root
warning: user mockbuild does not exist - using root
warning: group mockbuild does not exist - using root
########################################### [100%]
原因:
以下摘自:http://forums.fedoraforum.org/showthread.php?t=172322
pm -ivh SDL_image-1.2.5-4.fc6.src.rpm
1:SDL_image warning: user mockbuild does not exist - using root
warning: group mockbuild does not exist - using root
warning: user mockbuild does not exist - using root
warning: group mockbuild does not exist - using root
########################################### [100%]
warning: user mockbuild does not exist - using root
warning: group mockbuild does not exist - using root
Hello:
It's because you are installing a source rpm that was originally built using mock.
The source rpm contains all the binary packages, spec files etc. and from this package the standard rpm's are built.
You need to use the standard SDL_image-1.2.5-4.fc6.386.rpm or x86_64
意思是:需要下载一个已经编译好的标准rpm包。非src的源码package。
小结:src.rpm 是source包,要编译后才可以使用的;安装后是源码,rebuild后就会生成rpm包
方法:
下载完成:
[root@localhost beinan]# ls unrar*
unrar-3.5.2-1.2.fc4.src.rpm unrar.spec
安装源码包unrar-3.5.2-1.2.fc4.src.rpm;看一看安装在哪了呢?
[root@localhost beinan]# rpm -ivh unrar-3.5.2-1.2.fc4.src.rpm
安装在这里:
[root@localhost beinan]# ls /usr/src/redhat/SOURCES/unrar
unrar.1 unrarsrc-3.5.2.tar.gz
然后我们通过unrar.spec 来执行,其实他是一个写好的编译脚本;
[root@localhost beinan]# rpmbuild --ba unrar.spec
编译完成:
[root@localhost beinan]# ls /usr/src/redhat/RPMS/i386/
unrar-3.5.2-1.i386.rpm unrar-debuginfo-3.5.2-1.i386.rpm
是不是可以安装呢?
[root@localhost beinan]# rpm -ivh /usr/src/redhat/RPMS/i386/unrar-3.5.2-1.i386.rpm
Preparing... ########################################### [100%]
1:unrar ########################################### [100%]
是不是可用?
[root@localhost beinan]# unrar x mydoc.rar
清理垃圾文件:如果您经常用这种办法编译RPM 包,主要清理一下 /usr/src/redhat内各个目录的内容;
例 2:
方法一:
1.执行rpm -i your-package.src.rpm
2. cd /usr/src/redhat/SPECS
3. rpmbuild -bp your-package.specs 一个和你的软件包同名的specs文件
4. cd /usr/src/redhat/BUILD/your-package/ 一个和你的软件包同名的目录
5. ./configure 这一步和编译普通的源码软件一样,可以加上参数
6. make
7. make install
方法二:
1.执行rpm -i you-package.src.rpm
2. cd /usr/src/redhat/SPECS
前两步和方法一相同
3. rpmbuild -bb your-package.specs 一个和你的软件包同名的specs文件
这时,在/usr/src/redhat/RPM/i386/ (根据具体包的不同,也可能是i686,noarch等等)
在这个目录下,有一个新的rpm包,这个是编译好的二进制文件。
执行rpm -i new-package.rpm即可安装完成