linux .src.rpm,Linux 安装*src.rpm

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即可安装完成

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值