LinuxQuestions.org
Help answer threads with 0 replies.
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 04-07-2009, 09:15 AM   #1
D-a-a-n
LQ Newbie
 
Registered: Aug 2008
Posts: 7

Rep: Reputation: 0
Question Non-root rpm package installation


Hi all,

I have to install a postgres database on a redhat based system (Scientific Linux 5.3). The thing is, I can't have root privileges because this computer is used for important tasks. I was told it's possible to install a rpm without root access.

First I tried (I knew this would fail):
rpm -i postgres*.rpm
>> This gave me an error: Could not get transaction lock...etc

Then I found out you can change the root directory:
rpm -i postgres*.rpm --root /home/user
>> This gave me a lot of failed dependencies, e.g.: /sbin/ldconfig is needed by postgres....But ldconfig is of course present on my system


So for some reason, the system uses an dbpath other than /var/lib/rpm?
I also tried:

rpm --initdb /home/user
rpm -i postgres*.rpm --dbpath /home/user/var/lib/rpm
rpm -i postgres*.rpm --dbpath /var/lib/rpm

None of these worked and actually I'm not quite familiar with rpm, and initdb, dbpath parameter, so sorry if this sounds noobish.

Greetz Daan
 
Old 04-07-2009, 10:32 AM   #2
fpmurphy
Member
 
Registered: Jan 2009
Location: /dev/ph
Distribution: Fedora, Ubuntu, Redhat, Centos
Posts: 299

Rep: Reputation: 62
I do not know where you got the information that you can install RPMs without root access but in general this is simply not true.

If you are on a fedora/redhat/centos version of GNU/Linux, you should use yum install of rpm to install the package as it will automatically resolve any dependencies.
 
Old 04-08-2009, 04:24 AM   #3
Valery Reznic
ELF Statifier author
 
Registered: Oct 2007
Posts: 676

Rep: Reputation: 137Reputation: 137
While installing rpm as non-root with --root flag may be sometimes possible it's tricky and hard to maintain.

And why do it at all ?

Either sysadmin have nothing against postgres database on this box - so you can just ask him to install this rpm.
Or he against postgres installed here. And this case I am not sure it's a wise to try to install it.
 
Old 04-08-2009, 04:34 AM   #4
D-a-a-n
LQ Newbie
 
Registered: Aug 2008
Posts: 7

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by Valery Reznic View Post
While installing rpm as non-root with --root flag may be sometimes possible it's tricky and hard to maintain.

And why do it at all ?

Either sysadmin have nothing against postgres database on this box - so you can just ask him to install this rpm.
Or he against postgres installed here. And this case I am not sure it's a wise to try to install it.
Because it's actually an experiment, and all has to be done in our home dir...

btw, I also tried this: rpm --root=/home/user -ivh compat*.rpm --nodeps
>> This gave me this error:

Preparing... ########################################### [100%]
1:compat-postgresql-libs ########################################### [100%]
error: unpacking of archive failed on file /usr/lib64/libpq.so.4.1;49dc6c30: cpio: open failed - Permission denied


There really isn't a way to get around this?

Greetz Daan & thx for your replies
 
Old 04-08-2009, 04:48 AM   #5
Valery Reznic
ELF Statifier author
 
Registered: Oct 2007
Posts: 676

Rep: Reputation: 137Reputation: 137
Quote:
Originally Posted by D-a-a-n View Post
Because it's actually an experiment, and all has to be done in our home dir...

btw, I also tried this: rpm --root=/home/user -ivh compat*.rpm --nodeps
>> This gave me this error:

Preparing... ########################################### [100%]
1:compat-postgresql-libs ########################################### [100%]
error: unpacking of archive failed on file /usr/lib64/libpq.so.4.1;49dc6c30: cpio: open failed - Permission denied


There really isn't a way to get around this?

Greetz Daan & thx for your replies
May be it's can be done with something like fakeroot, but again - it's hard if ever possible.

And how come that you planning experiments on the important box ?
Why you don't use another box (physical or VM) where you have root access ?
 
Old 04-08-2009, 05:33 AM   #6
fpmurphy
Member
 
Registered: Jan 2009
Location: /dev/ph
Distribution: Fedora, Ubuntu, Redhat, Centos
Posts: 299

Rep: Reputation: 62
Quote:
There really isn't a way to get around this?
No there is not. And for good reason!
 
Old 04-08-2009, 06:42 AM   #7
rizwanrafique
Member
 
Registered: Jul 2006
Distribution: Debian, Ubuntu, openSUSE, CentOS
Posts: 147

Rep: Reputation: 19
You might be able to try sudo :-) That's how some people allow 'partial' root access.
 
Old 04-08-2009, 12:52 PM   #8
lazlow
Senior Member
 
Registered: Jan 2006
Posts: 4,363

Rep: Reputation: 172Reputation: 172
Any sysadmin who allows a sudo user to install/remove rpms just gave away his system. If one can install/remove rpms there is nothing to prevent one from installing versions that allow one to do whatever one wants to. You could install a modified rpm that allowed you to change the root password, game over. This is why only root should be able to install/remove software.

The usual way around this is not to install rpms, but to compile the software entirely within the users home space. Again this assumes the sysadmin allows this.
 
  


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
can i install rpm package as non-root user? parv Linux - Software 10 09-17-2004 10:46 PM
rpm package installation pelagic Linux - Software 3 09-09-2003 02:22 AM
RPM package installation problems nanabaffoe Linux - Software 7 07-18-2003 07:06 AM
rpm package installation DaDdY SnEb Linux - Newbie 3 06-19-2002 10:52 AM
RPM Package Installation Pimple Linux - General 5 03-15-2002 10:38 AM

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

All times are GMT -5. The time now is 03:29 PM.

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