Linux 安裝*src.rpm的時候出現錯誤

Linux 安裝*src.rpm的時候出現:

 

 

 

warning: user mandrake does not exist - using root 

warning: group mandrake does not exist - using root 

  

 

錯誤 。

症狀:

[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%]

 

 

 

 

 

 

 

   原因:

小結:src.rpm 是source包,要編譯後纔可以使用的;安裝後是源碼,rebuild後就會生成rpm包

方法:
1:
下載完成:
[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 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即可安裝完成。 
 
 

本文出自 “黃寶的博客” 博客,請務必保留此出處http://huangbao.blog.51cto.com/725279/152656

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章