开发者

RPM + cant find rpm after rpm install

please advice why I cant find the rpm that I installed. I am try to check by rpm -qa | grep test ( see the example in install the rpm: ) but seems that rpm isnt insta开发者_运维知识库lled why?

build the RPM:

 [root@linux /usr/src/redhat/SOURCES]#  rpm -ba   /usr/src/redhat/SPECS/my_spec.spec
 Checking for unpackaged file(s): /usr/lib/rpm/check-files /var/tmp/test.sh
 Wrote: /root/rpmbuild/SRPMS/test.sh-6.2-2.src.rpm

install the rpm:

   [root@linux /usr/src/redhat/RPMS/i386]# rpm -Uvh  /root/rpmbuild/SRPMS/test.sh-6.2-2.src.rpm 
   1:test.sh                ########################################### [100%]

   [root@linux /usr/src/redhat/RPMS/i386]# rpm -qa | grep test

   no results ?

the spec file:

  Summary: An example tool. To show a simple rpm build of the tool.
  Name: test.sh
  Version: 6.2
  Release: 2
  Source:/root/test.sh
  Group: Development/Debuggers
  BuildRoot:/var/tmp/test.sh
  License: OtherLicense
  %description


You installed the source rpm instead of the actual rpm:

rpm -Uvh /root/rpmbuild/RPMS/test.sh-6.2-2.rpm


rpmbuild outputs two files:

  1. A source RPM (SRPM), located in SRPMS/
  2. A binary RPM, located in RPMS//

As Wes noted, you've installed the SRPM. You need to install the RPM, which is located in your RPMS/i386/ subdir. Don't rename the SRPM, you need to look for the file located in the RPM folder and install it:

rpm -Uvh RPMS/i386s/test.sh-6.2-2.i386.rpm


When you install src.rpm it ends up in

  ~/rpmbuild/SPEC
  ~/rpmbuild/SOURCES

If you want to rebuild and get binary rpm you should:

  rpmbuild -ba test.sh-6.2-2.src.rpm

or even better

  mock test.sh-6.2-2.src.rpm


Try:

rpm -q test.sh-6.2-2

or

rpm -q test.sh-6.2-2.src
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜