Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I want to compile some 3rd party software and install it on a bootable usb drive...there are several packages that I need to install with apt-get before I compile it.

How could I store the apt-get packages on the thumb drive so that the 3rd party application I compile will work on the usb drive?

share|improve this question
add comment

1 Answer

The majority of the time the dependencies are only needed at compile time, and not usually after the application is compiled. If there are libraries that it is looking for, and is not on the usb drive, and hang with me for this one I know it sounds crazy, but I create a replica of the directory structure for the install, and move the libraries into it. IE: /usr/local/{bin,include,lib,sbin,share} Depending on what you set the prefix of the application to be (./configure --prefix=$usbMountPoint/usr/local )or if your past that point, you can do the good old DESTDIR reference. (make install DESTDIR=$usbMountPoint )

share|improve this answer
    
What I meant was how to use apt-get to install the 3rd party packages it downloads to my thumbdrive so that they are available on reboot from the thumbdrive. –  leeand00 Jun 6 '11 at 13:48
    
Wouldn't work, apt will always follow a specific script, and install in pre specified directories. Just to clarify on what I mentioned earlier, you can do something like the following(cd into the usb's mount point): dpkg -L libfaac-dev |while read line; do if [ -x $line ]; then mkdir -p $PWD$line; else cp -a $line $PWD$line; fi; done That will create the directory structure and all files involved in the package mentioned. The app you are installing on the usbdrive will most likely not function properly without the structure. –  darkdragn Jun 6 '11 at 16:43
    
So I guess I have to download the source for all dependent packages, and compile them all from scratch? It just seems like there should be a better way... –  leeand00 Jun 6 '11 at 20:43
    
If you run that command line that I mentioned up there, and replace libfaac-dev with whatever the package name is, then that will copy the contents of the package over to the usb drive, preventing you from having to download and compile from source. –  darkdragn Jun 6 '11 at 22:24
    
...goes to try this out... –  leeand00 Jun 10 '11 at 21:09
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.