LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 12-21-2016, 12:58 AM   #1
rksinghal
LQ Newbie
 
Registered: Dec 2016
Posts: 1

Rep: Reputation: Disabled
Upgrade package using RPM on CentOS 7.1


I have created a rpm package and 2 version pkg1 and pkg2. I am using Cent OS 7.1.
1. The pkg1 packages libffi.so.5 automatically and ships it with package. It works correctly. It creates following files after installation:
-rwxr-xr-x. 1 root root 30976 Jun 4 2015 <installation path>/lib/libffi.so.5
2. Due to some reason pkg2 is not able to package libffi.so.5 so I need to add it before creating final package. It also works correctly after installation. This creates following files after installation:
lrwxrwxrwx. 1 root root 38 Dec 16 13:12 <installation path>/lib/libffi.so -> <installation path>/lib/libffi.so.5.0.10
lrwxrwxrwx. 1 root root 38 Dec 16 13:12 <installation path>/lib/libffi.so.5 -> <installation path>/lib/libffi.so.5.0.10
-rwxr-xr-x. 1 root root 30976 Dec 13 15:47 <installation path>/lib/libffi.so.5.0.10

I am having problem when I upgrade from pkg1 to pkg2 using rpm -Uvh. After upgrade it deletes libffi.so.5 and due to that new binary is failing. Is there any work around or fix for it?

Thanks in advance

Regards,
 
Old 12-22-2016, 01:53 AM   #2
John VV
LQ Muse
 
Registered: Aug 2005
Location: A2 area Mi.
Posts: 17,523

Rep: Reputation: 2619Reputation: 2619Reputation: 2619Reputation: 2619Reputation: 2619Reputation: 2619Reputation: 2619Reputation: 2619Reputation: 2619Reputation: 2619Reputation: 2619
on 7.1 you DO NOT update packages any more
7.1 and 7.2 are past the END OF LIFE

you dist upgrade to CentOS 7.3

and use the CentOS repos

you almost NEVER need to install a package using the "rpm" command

use yum !

that is what it is there for
solving dependencies
 
Old 12-22-2016, 08:41 AM   #3
TB0ne
LQ Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 23,912

Rep: Reputation: 7014Reputation: 7014Reputation: 7014Reputation: 7014Reputation: 7014Reputation: 7014Reputation: 7014Reputation: 7014Reputation: 7014Reputation: 7014Reputation: 7014
Quote:
Originally Posted by rksinghal View Post
I have created a rpm package and 2 version pkg1 and pkg2. I am using Cent OS 7.1.
1. The pkg1 packages libffi.so.5 automatically and ships it with package. It works correctly. It creates following files after installation:
-rwxr-xr-x. 1 root root 30976 Jun 4 2015 <installation path>/lib/libffi.so.5
2. Due to some reason pkg2 is not able to package libffi.so.5 so I need to add it before creating final package. It also works correctly after installation. This creates following files after installation:
lrwxrwxrwx. 1 root root 38 Dec 16 13:12 <installation path>/lib/libffi.so -> <installation path>/lib/libffi.so.5.0.10
lrwxrwxrwx. 1 root root 38 Dec 16 13:12 <installation path>/lib/libffi.so.5 -> <installation path>/lib/libffi.so.5.0.10
-rwxr-xr-x. 1 root root 30976 Dec 13 15:47 <installation path>/lib/libffi.so.5.0.10

I am having problem when I upgrade from pkg1 to pkg2 using rpm -Uvh. After upgrade it deletes libffi.so.5 and due to that new binary is failing. Is there any work around or fix for it?
If installing pkg2 alone works, then I'd put something in pkg2 to check for pkg1's existence...and remove it before installation. Or, put that in the installation notes (you don't say what this is/does/how it's distributed/how many people, etc...), and let the users do it. Or...put a post execution script to move/delete/copy files after installation.

Have you tried running "yum update <pkg2 name>", instead of using the bare rpm command?
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Error unpacking rpm package httpd-2.2.15-45.el6.centos.x86_64 on centos 6.5 rookie5 Linux - Server 5 01-09-2019 05:55 PM
Error unpacking rpm package httpd-2.2.15-45.el6.centos.x86_64 on centos 6.5 rookie5 Linux - Newbie 1 08-16-2015 11:14 AM
Need to upgrade package beyond rpm availability - what to do? teeljb Linux - Newbie 1 12-17-2014 10:36 AM
Not able to upgrade the version of the rpm package manohare Red Hat 1 08-16-2007 08:40 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 04:04 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration