I have a Rpi2 and it is not connected to wifi and I cant connect it to Ethernet.
I have a Windows 10 pc and want to install packages offline on my rpi2.
Is this possible?
I have a Rpi2 and it is not connected to wifi and I cant connect it to Ethernet.
I have a Windows 10 pc and want to install packages offline on my rpi2.
Is this possible?
Well, technically it is possible.
For example use this:
dpkg -i package.deb
But most packages depend on other packages. So you will always have to manually download and install all referenced packages too for it to work.
You get all the referenced packages via
apt-cache rdepends packagename
To download all the packages you will need at once:
aptitude clean
aptitude --download-only install <your_package_here>
cp /var/cache/apt/archives/*.deb <your_directory_here>
One easy way to install offline if you have another computer with internet connection is to install synaptic: apt-get install synaptic
.
A menu will come up. Selection mark for installation.
It will find the dependencies you need for the package and ask if you want to install those. Say yes.
All packages are stored online, there's just no way of doing it offline. Your Pi will need internet access, either directly (WiFi or Ethernet) or indirectly (connect to a laptop with a bridged connection).
deb
, the package file extension. Beware the repo is potentially hundreds (thousands?) of GB and keeping it in sync will probably require a fair bit of traffic at whatever interval. You probably want to exclude the source packages. Debian has fairly extensive documentation including a decent wiki.
– goldilocks
Jun 20 '16 at 11:10
Is your problem the internet connection, or connecting to the Pi?
Given your host computer is connected to the internet, you can download the packages there, either by searching the debian repos (be sure to download packages for armhf architecture, if available), or by setting up a linux virtual machine.
You can then copy these packages over to the Pi, or put them somewhere on the sd card to install them as Gotschi suggested.
sudo dpkg -i package_name.deb
Protip: Have all of them in a new folder to install in bulk with '*' instead of the package name.
If you can't connect the Pi to your router, you could also use a direct connection via Ethernet. Here's an approach without any additional hardware(keyboard, etc.) This would also enable you to bridge the network connections (especially if your host is using WLAN), to give your Pi internet without linking it to your router.