LinuxQuestions.org
Latest LQ Deal: Complete CCNA, CCNP & Red Hat Certification Training Bundle
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 12-12-2011, 05:21 AM   #1
ammayappan
LQ Newbie
 
Registered: Sep 2011
Posts: 14

Rep: Reputation: Disabled
install a debian package into any directory than the usual


Hi
i am using ubuntu 11.04 and i want to install a package into any directory than the default location.On googling i found that apt-get does not install in a specific directory.So i downloaded using
$ apt-get download package_name

It was a .deb package.So i thought using the dpkg to install to specific directory using "instdir" option of it.
$dpkg --instdir=/home/user/ -i package_name.

It doesnt produce any error but the bianries and libraries are getting installed in the usual locations(/usr/bin,/usr/lib) nad not the directory i specified using the instdir option.

I don't know whether it is a proper option.I even tried out with root=/home/user option.
It also was not successfull..

please help me in this..
Any help is encouraged..

thanks
appan
 
Old 12-12-2011, 05:57 AM   #2
jdkaye
LQ Guru
 
Registered: Dec 2008
Location: Westgate-on-Sea, Kent, UK
Distribution: Debian Testing Amd64
Posts: 5,464

Rep: Reputation: Disabled
Is there any particular reason you want to do this? This may help us give you the best method for accomplishing what you want.
jdk
 
Old 12-12-2011, 06:06 AM   #3
ammayappan
LQ Newbie
 
Registered: Sep 2011
Posts: 14

Original Poster
Rep: Reputation: Disabled
Hi
The package i wanted to download is linaro cross compiling toolchain.As it needs to be given to my friend who doesn't have a internet connection on his own ,i took this to be a challenge(atleast for a newbie like me) and trying for this..


thanks
appan
 
Old 12-12-2011, 06:18 AM   #4
amilo
Member
 
Registered: Oct 2011
Location: Nederland
Distribution: Debian, Centos, Ubuntu
Posts: 78

Rep: Reputation: Disabled
You just have to extract the package.

code dpkg -x 'packagename' 'directory'
 
Old 12-12-2011, 06:46 AM   #5
ammayappan
LQ Newbie
 
Registered: Sep 2011
Posts: 14

Original Poster
Rep: Reputation: Disabled
Hi
I think so the above option, dpkg -x 'packagename' 'directory' just extracts into the specified directory.I wanted to "install" the contents ,not just extract.Sorry if i had not made myself clear in that.

thanks
appan
 
Old 12-12-2011, 07:14 AM   #6
jdkaye
LQ Guru
 
Registered: Dec 2008
Location: Westgate-on-Sea, Kent, UK
Distribution: Debian Testing Amd64
Posts: 5,464

Rep: Reputation: Disabled
I'm still not sure I understand you. If your friend has no internet connection why not just give him the deb file? He can install it on his system with dpkg.
jdk
 
Old 12-12-2011, 07:21 AM   #7
ammayappan
LQ Newbie
 
Registered: Sep 2011
Posts: 14

Original Poster
Rep: Reputation: Disabled
Hi
ya that will be a better option..thanks.But i am interested in knowing that..please let me know..


thanks
appan
 
Old 12-12-2011, 08:15 AM   #8
jdkaye
LQ Guru
 
Registered: Dec 2008
Location: Westgate-on-Sea, Kent, UK
Distribution: Debian Testing Amd64
Posts: 5,464

Rep: Reputation: Disabled
I still don't understand what you are trying to do. How will installing the package files in /home/user/usr/bin and /home/user/usr/share/doc/linaro-image-tools/ rather than
/usr/bin and /usr/share/doc/linaro-image-tools/ help you do anything differently. Please try to explain clearly what exactly you want to do.
jdk
 
Old 12-12-2011, 01:14 PM   #9
DavidMcCann
Senior Member
 
Registered: Jul 2006
Location: London
Distribution: CentOS, Salix
Posts: 4,269

Rep: Reputation: 1268Reputation: 1268Reputation: 1268Reputation: 1268Reputation: 1268Reputation: 1268Reputation: 1268Reputation: 1268Reputation: 1268
I think you're confusing Linux with Windows! Every Windows program comes with any libraries required, so everything winds up in "c:\Program Files\whatever\". In Linux, programs share libraries, so they must be in a recognised place so that the programs can find them. Similarly, the binaries need to be in a recognised place so that the operating system can find them (use "echo $PATH" to see where it looks). In Windows you couldn't put a program just anywhere: if it's not in Program Files or the current directory, the OS can't find it.
 
Old 12-12-2011, 11:10 PM   #10
ammayappan
LQ Newbie
 
Registered: Sep 2011
Posts: 14

Original Poster
Rep: Reputation: Disabled
Hi
Got my friend's exact requirement now..
He is doing a project on embedded systems,where he needs to create his own root filesystem, with the linaro cross compiler installed in it.For that he is trying to install the linaro in a particular directory,and after creating the root file system, he may be able to copy the corresponding entries(binaries, libraries etc....) in the corresponding directories(/usr/bin, /usr/lib...) on the root file system.Is this a possible approach?Is there any other approach for this..Please let me know this...

thanks
appan
 
Old 12-13-2011, 03:44 AM   #11
jdkaye
LQ Guru
 
Registered: Dec 2008
Location: Westgate-on-Sea, Kent, UK
Distribution: Debian Testing Amd64
Posts: 5,464

Rep: Reputation: Disabled
If your friend has root privileges on the system he is using he can put the individual files of the package wherever he wants on his own system. As DavidMcCann mentioned above this will probably cause problems if the files are put in strange places. I really don't know what you are trying to do but I guess the simplest thing is to send him the package and let him extract the files to whatever directory he wishes.
jdk
 
  


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
[SOLVED] The slackware package description in the install directory it isnt read by pkgtool Gerwar Linux - Software 2 05-29-2011 01:16 PM
Debian - higher footprint than usual? Changes Linux - General 1 01-19-2011 05:55 AM
[SOLVED] My debian package fails implementing a menu directory in mintmenu. _sluimers_ Linux Mint 3 10-04-2010 07:32 AM
benefits of copying package into spool directory then install later? taiwf Solaris / OpenSolaris 1 09-25-2009 04:02 AM
How can I install my .tgz package under a directory besides root? bankfishin Slackware 1 05-22-2004 06:31 PM


All times are GMT -5. The time now is 12:33 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