LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 06-22-2009, 11:42 PM   #1
priya@linux
LQ Newbie
 
Registered: Jun 2009
Posts: 3

Rep: Reputation: 0
Installing an RPM as non-root user in $HOME


hello ,
i m new to linux and try to install this pkg gdis-0.77.0-1.i386.rpm in my home directory (i m not @root ) can uany one tell me hw to do it?
 
Old 06-23-2009, 12:58 AM   #2
linuxlover.chaitanya
Senior Member
 
Registered: Apr 2008
Location: Nagpur, India
Distribution: Cent OS 5/6, Ubuntu Server 10.04
Posts: 4,629

Rep: Reputation: Disabled
I suspect you need to be root to use the rpm command itself, so it does not matter where you want to install it, you will still need to be root to perform the action.
 
Old 06-23-2009, 06:59 AM   #3
Simon Bridge
LQ Guru
 
Registered: Oct 2003
Location: Waiheke NZ
Distribution: Ubuntu
Posts: 9,211

Rep: Reputation: 198Reputation: 198
You don't - that's not how rpm's work. man rpm to see why.

The package will be set up to install to the standard locations for the program.
If you want to install to a non-standard location for some reason, you'll need to use the source code or find a stand-alone binary. Unless... you have some reason to believe that this rpm is supposed to install to your home directory???
 
Old 06-24-2009, 02:27 AM   #4
priya@linux
LQ Newbie
 
Registered: Jun 2009
Posts: 3

Original Poster
Rep: Reputation: 0
i am having ubuntu and want to install gulp-3.0 (not an rpm pkg)
in my home dir not as root . hw i will do it?
 
Old 06-24-2009, 03:36 AM   #5
rikxik
Member
 
Registered: Dec 2007
Posts: 88

Rep: Reputation: 19
You'll have to compile the source code:
1. Download the source code e.g. gulp-3.0.tar.gz
2. Extract the source: tar zxf gulp-3.0.tar.gz
3. This should create a directory with the source in it: e.g. gulp-3.0
4. cd gulp-3.0
5. Usually files like "READEME" or "INSTALL" are provided with source which instruct how to compile.
6. Typically there should be a "configure" file. Execute it like this: ./configure
7. This will do all the checks and then should create a Makefile. If it fails, you'll have to troubleshoot depending on the error message / missing library etc.
8. If ./configure works fine, then just run this:

make

Assuming the compilation goes through, it should create a binary file (e.g. "gulp" in this case) in some subdirectory - if this is all you need, just locate the "gulp" binary (use 'find' command) and then copy it to your home directory.

So you see, its not that you CANNOT do it, its just easier installing using apt-get as root (since you are using Ubuntu). It could be as simple as (depending upon whether its in the repositories configured in your /etc/apt):

sudo apt-get install gulp

Frankly, I fail to see the point of going through these hoops when all you care is to install and use this program.

Last edited by rikxik; 06-24-2009 at 03:40 AM.
 
Old 06-24-2009, 05:15 AM   #6
linuxlover.chaitanya
Senior Member
 
Registered: Apr 2008
Location: Nagpur, India
Distribution: Cent OS 5/6, Ubuntu Server 10.04
Posts: 4,629

Rep: Reputation: Disabled
Yeah using apt or synaptic will surely be better but it will not install package in your home directory. It will be installed system wide.
 
Old 06-25-2009, 12:32 AM   #7
Simon Bridge
LQ Guru
 
Registered: Oct 2003
Location: Waiheke NZ
Distribution: Ubuntu
Posts: 9,211

Rep: Reputation: 198Reputation: 198
Which leads to the question - why install to the home directory?
There are two main reasons -

1. you do not want other users to access the program
2. you do not have admin access

The first one may be antisocial - but a sysadmin may want to quickly check out a program before making it available system wide (which is what test machines are for but ho hum) The second seems more likely - in which case, you should ask the admin for the install and respect the decision. This is tough if the admin insists on being an icehole.

Note - I've been trying to find this program. I have found General Utility Lattice Program for chemistry - is this it?
 
Old 06-25-2009, 01:07 AM   #8
linuxlover.chaitanya
Senior Member
 
Registered: Apr 2008
Location: Nagpur, India
Distribution: Cent OS 5/6, Ubuntu Server 10.04
Posts: 4,629

Rep: Reputation: Disabled
But anyhow, even to install a program from source you need to be root to run make install.
And thats for the security purposes. Even windows will not allow non admins to install programs system wide.
 
Old 06-25-2009, 01:50 AM   #9
Simon Bridge
LQ Guru
 
Registered: Oct 2003
Location: Waiheke NZ
Distribution: Ubuntu
Posts: 9,211

Rep: Reputation: 198Reputation: 198
Quote:
Originally Posted by linuxlover.chaitanya View Post
But anyhow, even to install a program from source you need to be root to run make install.
And thats for the security purposes. Even windows will not allow non admins to install programs system wide.
This is not correct - you do not need to be root to install from source to a directory for which you have permission to do this. Like your home directory.

"make install" usually installs to /bin or /sbin or similar, which does require root access. However, the configure files may include the option to install to a non-standard location. running ./configure with these options creates a makefile with a different distination for the install step.

It is not uncommon.

It is also possible to edit the top level makefile to install to a different place.
(Editing the makefile used to be routine.)

The ability to modify the build process is part of what free software is all about.

Naturally, there is nothing stopping the sysadmin from adding security requirements which restrict source installs.
 
Old 06-25-2009, 01:55 AM   #10
linuxlover.chaitanya
Senior Member
 
Registered: Apr 2008
Location: Nagpur, India
Distribution: Cent OS 5/6, Ubuntu Server 10.04
Posts: 4,629

Rep: Reputation: Disabled
Ok I should have been more specific on that I compared for system wide installation. And compeletly migrated from the original subject as well in doing that.
I should not have worked till 2. Low on sleep today.
 
Old 06-25-2009, 02:32 AM   #11
colucix
LQ Guru
 
Registered: Sep 2003
Location: Bologna
Distribution: CentOS 6.5 OpenSuSE 12.3
Posts: 10,509

Rep: Reputation: 1978Reputation: 1978Reputation: 1978Reputation: 1978Reputation: 1978Reputation: 1978Reputation: 1978Reputation: 1978Reputation: 1978Reputation: 1978Reputation: 1978
Indeed the best solution is that one suggested by Simon_Bridge, that is asking to your system administrator to install the package, especially if it is a scientific software that can be useful to other users, too. That said, there is a chance you can run a program provided by a rpm if you create the proper environment.

First you have to extract the RPM content (for example in $HOME/gulp) then you have to update your PATH and LD_LIBRARY_PATH and eventually MANPATH (if the package comes with some manual pages). Then check if the executables are properly linked to the necessary shared objects using the ldd command. Also check if there is some shell script in the package that you can edit to change paths. Be sure you install all the dependencies of the package in the same way and most likely you can run your locally installed RPM.
 
Old 06-25-2009, 08:18 AM   #12
priya@linux
LQ Newbie
 
Registered: Jun 2009
Posts: 3

Original Poster
Rep: Reputation: 0
thanx 2 all for ur suggetions

thanx for giving step by step procedure for installation of gulp .
but i m gettin an error like wen i try to install a tar.gz pkg :

"Perhaps you should add the directory containing `gtkglext-1.0.pc'
to the PKG_CONFIG_PATH environment variable
No package 'gtkglext-1.0' found"
i m really newbie , thnx again









Quote:
Originally Posted by rikxik View Post
You'll have to compile the source code:
1. Download the source code e.g. gulp-3.0.tar.gz
2. Extract the source: tar zxf gulp-3.0.tar.gz
3. This should create a directory with the source in it: e.g. gulp-3.0
4. cd gulp-3.0
5. Usually files like "READEME" or "INSTALL" are provided with source which instruct how to compile.
6. Typically there should be a "configure" file. Execute it like this: ./configure
7. This will do all the checks and then should create a Makefile. If it fails, you'll have to troubleshoot depending on the error message / missing library etc.
8. If ./configure works fine, then just run this:

make

Assuming the compilation goes through, it should create a binary file (e.g. "gulp" in this case) in some subdirectory - if this is all you need, just locate the "gulp" binary (use 'find' command) and then copy it to your home directory.

So you see, its not that you CANNOT do it, its just easier installing using apt-get as root (since you are using Ubuntu). It could be as simple as (depending upon whether its in the repositories configured in your /etc/apt):

sudo apt-get install gulp

Frankly, I fail to see the point of going through these hoops when all you care is to install and use this program.
 
Old 06-25-2009, 08:26 AM   #13
zhjim
Senior Member
 
Registered: Oct 2004
Distribution: Debian Squeeze x86_64
Posts: 1,748
Blog Entries: 11

Rep: Reputation: 233Reputation: 233Reputation: 233
You might try something totaly diffrent.
(Not tested just from mind)
Code:
rpm --root /home/username --initdb
rpm --root /home/username -i the_name_of_the.rpm
--root directory uses the directory as the new root. Needs to be absolute path
rpm might complain about not able to create a directory. Just creat the directory.
Same might happen when installing the rpm.

you might also need to append --nosignature --nodeps to the second line (rpm --root /home/username -i the_name_of_the.rpm).
 
Old 06-25-2009, 11:18 PM   #14
rikxik
Member
 
Registered: Dec 2007
Posts: 88

Rep: Reputation: 19
Quote:
Originally Posted by priya@linux View Post
thanx for giving step by step procedure for installation of gulp .
but i m gettin an error like wen i try to install a tar.gz pkg :

"Perhaps you should add the directory containing `gtkglext-1.0.pc'
to the PKG_CONFIG_PATH environment variable
No package 'gtkglext-1.0' found"
i m really newbie , thnx again
Try locating the gtkglext-1.0.pc and add to the variable as it says and retry - even if fix this, you may get further compile time errors. As I said, compiling from source is not for newbies so maybe getting your admin to help you out is not such a bad idea considering the s/w in question doesn't seem to warrant any secrecy.

Well, there have been many suggestions in this thread so try others too. In particular if the suggestion by zhjim works, it will be the best for you.
 
Old 06-25-2009, 11:28 PM   #15
vap16oct1984
Member
 
Registered: Jun 2009
Location: INDIA
Distribution: RHEL-5
Posts: 174
Blog Entries: 3

Rep: Reputation: 38
Hi Priya,
i think u just go through RPM. It helps u a lot to solve ur problem by urself.

u always welcome here if u have any doughts. We can also contact us, email us or IM.
 
  


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
Is there is any wat to non root user can able to install rpm baskar.v Linux - Newbie 9 11-18-2008 03:23 AM
installing an rpm as a non-root user sidra Red Hat 2 09-19-2007 02:54 PM
rpm -i --prefix=/home/user package.src.rpm doesn't work? registering Linux - Software 2 07-18-2007 11:28 AM
can i install rpm package as non-root user? parv Linux - Software 10 09-17-2004 10:46 PM
rpm freezes up while installing as root timberwolf Linux - Software 4 12-07-2003 05:18 PM


All times are GMT -5. The time now is 01:25 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration