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?


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 )

  • 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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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