0

Many webpages have all kinds of instructions to do cool things and these instructions needs to do "apt-get...", but what if this Raspberry is not online?

Is there any way to install/update apps without net?

  • apt-get downloads libraries from a central repository, so I would say no – PhillyNJ May 2 '14 at 16:11
1

Note: Both methods I describe require another device with internet connectivity.

I've ordered these by sustainability, which (perhaps not) coincidentally means that it also is sorted hardest to easiest.

Debian Mirror

If the RasPi can only access a LAN but not the internet (ex: firewall), then on another device on the LAN that has internet connectivity, you could setup a Debian Mirror and then point apt-get to use that mirror as that article describes. Make sure when you're setting up /etc/apt/mirror.list that you set defaultarch to armel and armhf:

defaultarch armel armhf

Otherwise you'll get a bunch of others architectures (a lot more to download). The benefit with this setup is that you'll always be able to get the latest packages (through the mirror) even if the RasPi never gets internet connectivity. The downside is that to mirror, you'll need quite a bit of free space.

Apt-Offline

apt-offline is a useful tool similar to moving .debs around, but it uses apt to manage the package, meaning if the RasPi gets internet later, you can remove/update/etc the package like you normally would with apt-get. The benefits of this method is that it will likely be quicker to get running, but won't be sustainable if you plan on installing a lot of packages or updating often.

.deb Files

If the RasPi has no network connectivity whatsoever, then you could download the .deb files from another internet connected computer and then transfer them to the RasPi (via flash drive, etc) and then use sudo dpkg -i package_file.deb to install them.

You can download the .deb files from the following. You may have to check both links for a specific package, but prefer armhf if both have the package.

https://packages.debian.org/squeeze/armel/PACKAGE_NAME/download https://packages.debian.org/squeeze/armhf/PACKAGE_NAME/download

  • 1
    Perhaps, if you do have LAN, an alternative to the mirror you mention might be something like the easier to set-up and use aptcacher-ng. I generally use that anyways, just to reduce my load on their servers and speed my frequent (re)installs of Ubuntu for test beds and RasBian images. packages.debian.org/sid/apt-cacher-ng – growlf May 2 '14 at 18:06
  • Oh, thanks for the link; I could have sworn I'd seen something like that for apt, but couldn't remember what it was. – Jacob Hayes May 2 '14 at 19:57

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.