Question

Error in rpm file and error in rpm file execution

Asked by: palhade

I am able to compile spec file and able to build rpm file.

But 2 rpm files are getting create at two different location . 1 in * /RPMS/x86pc/ folder and another in */SRPMS/ folder. I tried to execute both rpm files and getting different result for both rpm files.

Following is the output for both rpm files.

# cd /opt/sys/src/rpm/RPMS/x86pc/
# rpm -Uv story-1.0-1.x86pc.rpm
error: LOOP:
error: removing story-1.0-1.x86pc "Requires: /opt/Story" from tsort relations.
Preparing packages for installation...
error: Install/Erase problems:
       package story-1.0-1.x86pc is already installed
# cd ..
# cd ..
# pwd
/opt/sys/src/rpm
# ls
.          BUILD      SOURCES    SRPMS
..         RPMS       SPECS
# cd SRPMS/
# rpm -Uv story-1.0-1.src.rpm
Preparing packages for installation...
story-1.0-1.src
#

When i use #rpm -qa command it gives output "story-1.0-1.x86pc.rpm"

But when i tried to uninstall with #rpm -e story-1.0-1.x86pc.rpm. i am getting output "error: package story-1.0-1.x86pc.rpm is not installed".


Please help me to resolve this issue.

Attached is the output of building rpm file from spec file.

Thanks in advance

  • output.txt
    • 1 KB

    output of building rpm file from spec file

This Question has been solved and asker verified All Experts Exchange premium technology solutions are available to subscription members.

Subscribe now for full access to Experts Exchange and get

Instant Access to this Solution

  • Plus...
  • 30 Day FREE access, no risk, no obligation
  • Collaborate with the world's top tech experts
  • Unlimited access to our exclusive solution database
  • Never be left without tech help again

Subscribe Now

Asked On
2009-08-19 at 09:25:06ID24665390
Topics

RPM Installer

,

Linux

Participating Experts
2
Points
500
Comments
10

Trusted by hundreds of thousands everyday for fast, accurate and reliable tech support.

  • "The time we save is the biggest benefit of Experts Exchange to Warner Bros. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange." Mike Kapnisakis, Warner Bros.
  • "Our team likes having a resource that is more secure than just using Google and most experts using this service really know their stuff. It's nice to look here first versus using Google." Dayna Sellner, Lockheed Martin
  • "Anytime that I've been stumped with a problem, 9 out of 10 times Experts Exchange has either the accepted solution or an open discussion of the potential solution to the problem." Kenny Red, eBay Inc.

See what Experts Exchange can do for you.

Got a question?

We've got the answer.

Experts Exchange has been collecting answers to technology questions since 1996…3 million and counting! If you have a question, chances are we already have your answer.

Screenshot of Experts Exchange Knowledgebase

Need individual assistance?

Our experts are ready to help.

If you can't find the exact answer you're looking for, ask our exclusive community of 50,000 experts. You’ll get a personalized answer from a trusted professional.

Screenshot of Experts Exchange Knowledgebase

Want to learn from the best?

Read articles from industry experts.

Thousands of free tech tips, tricks, how-to’s and tutorials are available in our peer reviewed articles section. See for yourself how smart our experts are, no login required.

Screenshot of an Article

Working on a long term project?

Store your work and research.

Save solutions to your questions, answers you’ve discovered through searching plus helpful articles in your personal knowledgebase for easy future access.

Screenshot of Experts Exchange Knowledgebase

Access the answers to your technology questions today.

Subscribe Now

30-day free trial. Register in 60 seconds.

What Makes Experts Exchange Unique?

Members of the expert community talk about why the experience at Experts Exchange is different than what you will find anywhere else.

Trusted by the world's most respected brands.

image of each brand's logo

Faithfully serving IT professionals since 1996.

Experts Exchange Logo

Try it out and discover for yourself.

Subscribe Now

30-day free trial. Register in 60 seconds.

Related Solutions

  1. rpm
    What is the use of rpm command ?
  2. RPM Question
    System: AMD 450/256/6.4GH WDC OS: Clean Full Install of 7.2 Redhat Workstation Desktop: Gnome I am trying to install some RPM's. The rpm's seem to install fine via the gnorpm program or via command line in Terminal Window. (No errors) When I do a rpm -qa gcc3.... It's ...
  3. rpm problem
    I had a RedHat Linux 8.0 machine I tried to install a RPM using rpm -ivh command. After showing the progress to 100%, the command hangs. I have to terminate the command using only kill. After that even "rpm -qa" hangs and i have to kill the command. What might be th...
  4. .rpm uninstall
    How to uninstall .rpm file ?
  5. how to create rpm file from source code
    Hi, I have source code. Now I want make .rpm file from this source code. Means I want to make package from this source code. Please help.

Free Tech Articles

  1. WARNING: 5 Reasons why you should NEVER fix a computer for free.
    It is in our nature to love the puzzle. We are obsessed. The lot of us. We love puzzles. We love the challenge. We thrive on finding the answer. We hate disarray. It bothers us deep in our soul. W...
  2. SCCM OSD Basic troubleshooting
    SCCM 2007 OSD is a fantastic way to deploy operating systems, however, like most things SCCM issues can sometimes be difficult to resolve due to the sheer volume of logs to sift through and the dispe...
  3. Migrate Small Business Server 2003 to Exchange 2010 and Windows 2008 R2
    This guide is intended to provide step by step instructions on how to migrate from Small Business Server 2003 to Windows 2008 R2 with Exchange 2010. For this migration to work you will need the fo...
  4. Create a Win7 Gadget
    This article shows you how to create a simple "Gadget" -- a sort of mini-application supported by Windows 7 and Vista. Gadgets can be dropped anywhere on the desktop to provide instant information, ...
  5. Outlook continually prompting for username and password
    There have been a lot of questions recently regarding Outlook prompting for a username and password whilst using Exchange 2007. There are a few reasons why this would happen and I will try to cover t...
  6. Backup Exchange 2010 Information Store using Windows Backup
    There seems to be quite a lot of confusion around the ability to backup Exchange 2010 using the built in Windows Backup feature. This stems from the omission of this feature prior to Exchange 2007 s...

Cloud Class Webinars

  1. Avoiding Bugs in Microsoft Access
    Alison Balter takes and in-depth look at avoiding bugs in Access. In this webinar you will learn about using the immediate window to debug your applications, invoking the debugger, using breakpoints to troubleshoot, stepping through code, setting the next statement to execute, ...
  2. Top 10 Best New Features in Visio 2010
    Scott Helmers gives live demonstrations of the top 10 new features in Visio 2010. This webinar will teach you how to create compelling diagrams by adding shapes to the page with a single click, linking the shapes in a diagram to data in Excel (or SQL Server, or SharePoint), ...
  3. IT Consultant Business Secrets Revealed
    Michael Munger, Experts Exchange tech pro and IT consultant, pulls back the curtain on his very successful businesses and answers question on every IT consultant and business owner should know about. He shares secrets on what he did to solve the 5 most common problems in IT, ...
  4. Disaster Recovery and Business Continuity
    Quest CTO, Mike Billon, gives an overview of the steps involved in building a dunamic disaster recovery plan. Through case studies and an examination of software/hardware tooles for monitoring and testing, you'll gain a better understandin of where you are, where you want ...
  5. Organize Your Visio Diagrams with Containers and Lists
    Scott Helmers uses cross functional flowcharts, wireframe diagrams, data graphic legends and seating charts to teach you: how to ustilize all three new structured diagram components in Visio 2010, the best practices for organizeing shapes in previous version of Visio, how to organize ...
  6. How to Us Objects, Properties, Events and Methods in Microsoft Access
    Alison Dalter gives an in-depbth look at objects, properties, events and methods in Microsoft Access. In this webinar you will learn about using the object browser, referring to objects, working with properties and methods, working with object variables, understanding the ...

Join the Community

Give a Little. Get a Lot.

Join the community of experts here and help other tech pros by answering question in your area of expertise. You can earn FREE access to all Experts Exchange's premium features and resources.

Join the Community

Answers

 

by: palhadePosted on 2009-08-19 at 09:34:48ID: 25134589

I guess i need to use following command to install from rpm

# rpm -Uv story-1.0-1.x86pc.rpm

But i am getting following error message after executing above command

# rpm -Uv story-1.0-1.x86pc.rpm
error: LOOP:
error: removing story-1.0-1.x86pc "Requires: /opt/Story" from tsort relations.
Preparing packages for installation...
error: Install/Erase problems:
      package story-1.0-1.x86pc is already installed
# cd ..

PLEASE HELP ME TO REMOVE ABOVE ERRORS

Also


When i use following command

#rpm -qa command

I am getting output "story-1.0-1.x86pc.rpm"


But when i tried to uninstall with #rpm -e story-1.0-1.x86pc.rpm. i am getting output "error: package story-1.0-1.x86pc.rpm is not installed".



Please help me to resolve this issue.

Thanks in advance

 

by: ollfriedPosted on 2009-08-19 at 10:09:41ID: 25134964

You can uninstall it by typing "rpm -e story", without version and extension.

 

by: unSpawnPosted on 2009-08-20 at 04:05:52ID: 25140981

> But 2 rpm files are getting create at two different location . 1 in * /RPMS/x86pc/ folder and another in */SRPMS/ folder. I tried to execute both rpm files and getting different result for both rpm files.

As said in http://www.experts-exchange.com/OS/Linux/Q_24650151.html The rpm created in /RPMS/x86pc/ is the actual package and the one in */SRPMS/ a source rpm (.src.rpm). You dont install a .src.rpm unless you want to rebuild a package.


> error: LOOP:
> error: removing story-1.0-1.x86pc "Requires: /opt/Story" from tsort relations.

If "MyrpmTest7.spec" still contains the "%dir /" and "%dir /opt" lines in the %files section then remove those lines, rebuild the RPM, run 'rpm -e --justdb story', then 'rpm -i story-1.0-1.x86pc.rpm'.

 

by: palhadePosted on 2009-08-20 at 06:38:50ID: 25142333

1. I removed "%dir /" and "%dir /opt" lines in the %files section. build rpm file and tried to execute following command.

# rpm -e --justdb story
error: LOOP:
error: removing story-1.0-1.x86pc "Requires: /opt/Story" from tsort relations.

PLEASE LET ME KNOW WHY THIS ERROR OCCURRESS

2. I tried to following command . I guess it is correct.

# rpm -i story-1.0-1.x86pc.rpm
# rpm -i story-1.0-1.x86pc.rpm
error: Install/Erase problems:
       package story-1.0-1.x86pc is already installed
# rpm -i story-1.0-1.x86pc.rpm
error: Install/Erase problems:
       package story-1.0-1.x86pc is already installed

 

by: palhadePosted on 2009-08-20 at 06:50:11ID: 25142480

Here is the content of spec file. I tried to build "rpm file" from attached "spec file" with following command and following the output during execution. i believe output is not as per expectation.

spec file is in attchment.

output of building rpm from spec file is also in attchment as image file . i marked error in image with red color please help me to reomve red color mark.

 

by: unSpawnPosted on 2009-08-20 at 08:40:03ID: 25143905

The "mktemp: cannot execute" error in /opt/sys/lib/rpm/check-files occurs because 'check-files' expects the TMPDIR environment variable to be set. If it is not set then it will resort to using /tmp as directory to creat a directory in to write temporary files into. Possibly you do not have /tmp or you have no rights(?) to write to /tmp (that would be awkward). before you begin building the package, try exporting the TMPDIR environment variable: 'export TMPDIR=/opt/sys/var/tmp'. After exporting the TMPDIR environment variable the 'check-files' errors should disappear.

! Posting a JPEG image is OK, but next time please *also* attach the .rpm.tmp file like you did previously.

 

by: palhadePosted on 2009-08-20 at 09:49:14ID: 25144648

1. "/tmp" folder is present

2. I tried to create test file in "/tmp" folder and tried to write inside that file. This i am able to do. This means i have right to /tmp folder.

Following is the result after export command. But i am not sure with rpm.tmp you need because in output it shows 3 tmp files(rpm-tmp.12308
, rpm-tmp.29147 and rpm-tmp.30055) but no file is present in this folder "/opt/sys/var/tmp/ "

# export TMPDIR=/opt/sys/var/tmp
# rpm -ba MyrpmTest7.spec
Executing(%prep): /bin/sh -e /opt/sys/var/tmp/rpm-tmp.12308
+ umask 022
+ cd /opt/sys/src/rpm/BUILD
+ cd /opt/sys/src/rpm/BUILD
+ rm -rf story-1.0
+ /bin/mkdir -p story-1.0
+ cd story-1.0
+ cp -c /opt/sys/src/rpm/SOURCES/Prog.txt ./
+ cp -c /opt/sys/src/rpm/SOURCES/Oste.txt ./
+ cp -c /opt/sys/src/rpm/SOURCES/Manoj.txt ./
+ exit 0
Executing(%install): /bin/sh -e /opt/sys/var/tmp/rpm-tmp.29147
+ umask 022
+ cd /opt/sys/src/rpm/BUILD
+ /bin/rm -rf /opt/sys/var/tmp/story-root
+ /bin/mkdir -p /opt/sys/var/tmp/story-root
+ cd story-1.0
+ echo Done 1
Done 1
+ mkdir -p /opt/sys/var/tmp/story-root/opt/Story
+ cp -c Prog.txt /opt/sys/var/tmp/story-root/opt/Story/Prog.txt
+ cp -c Oste.txt /opt/sys/var/tmp/story-root/opt/Story/Oste.txt
+ cp -c Manoj.txt /opt/sys/var/tmp/story-root/opt/Story/Manoj.txt
+ exit 0
Processing files: story-1.0-1.x86pc
Checking for unpackaged file(s): /opt/sys/lib/rpm/check-files /opt/sys/var/tmp/story-root
/opt/sys/lib/rpm/check-files[17]: mktemp: cannot execute - No such file or directory
/opt/sys/lib/rpm/check-files[18]: mktemp: cannot execute - No such file or directory
/opt/sys/lib/rpm/check-files[23]: cannot create : No such file or directory
sed: Couldn't close {standard output}
/opt/sys/lib/rpm/check-files[24]: cannot create : No such file or directory
diff: : No such file or directory
diff: : No such file or directory
rm: Must specify file[s] for removal.
rm: Must specify file[s] for removal.
Wrote: /opt/sys/src/rpm/SRPMS/story-1.0-1.src.rpm
Wrote: /opt/sys/src/rpm/RPMS/x86pc/story-1.0-1.x86pc.rpm
Executing(%clean): /bin/sh -e /opt/sys/var/tmp/rpm-tmp.30055
+ umask 022
+ cd /opt/sys/src/rpm/BUILD
+ cd story-1.0
+ /bin/rm -rf /opt/sys/var/tmp/story-root
#

 PLEASE HELP ME TO RESOLVE THIS ISSUE.

 

by: unSpawnPosted on 2009-08-20 at 11:25:24ID: 25145619

Looking at your output it shows the process wrote both the .src.rpm (story-1.0-1.src.rpm) and the story-1.0-1.x86pc.rpm. If the contents of those packages are OK then I think you can safely disregard the mktemp errors. And please do not use all-caps text.

 

by: palhadePosted on 2009-09-15 at 05:58:05ID: 31617699

error was at different location

 

by: unSpawnPosted on 2009-09-15 at 12:54:07ID: 25338656

In general I would like to remark that it would be appreciated if question owners acknowledge their responsability for facilitating resolution and EE quality by providing accurate, expedient and constructive feedback.

20120131-EE-VQP-002

3 Ways to Join

30-Day Free Trial

The Experts

98% positive feedback on 31,087 answers since March 2000. angeliii is a Microsoft Most Valuable Professional for his work with MS SQL Server & Develoment.

He has also proven his knowledge of Visual Basic Programming, PHP Scripting and Oracle Databases.

The Experts

97% positive feedback on 10,752 answers since July 2000. lrmoore has more than 18 years experience in the networking industry.

The six-time Mircosoft MVPs specialties include firewalls, virtual private networking, and network management.

Testimonials

"...and excellent source for support... Kind of like having your very own IT dept." Electriciansnet

Testimonials

"I was apprehensive at signing up at first. However... it has already made my life as an IT administrator much easier." JaCrews

Testimonials

"WOW! You guys have great, active, and knowledgeable people on here." moore50

Business Clients

Business Clients

In the Press

"If you’ve got a question... Experts Exchange can supply an answer.”

In the Press

"...an invaluable aid for both IT professionals and those who require tech support."

In the Press

"where IT professionals provide quick answers on just about any topic"

Business Account Plans

Loading Advertisement...