21

As of now I don't have a wifi adapter for Raspberry Pi with me. If I want to update or install any software, my Rpi should be connected to internet. Is there any way I can install software in offline mode? Is there any source where I can find software packages such as Omxplayer etc., do download from my other PC (where I have internet access) and install it on the Raspberry Pi?

Any help would be greatly appreciated.

5
  • 3
    you should wait until you get a network connection. downloading, copying around and installing random .deb packages is a very reliable way to mess up your system beyond any recognition.
    – lenik
    Jul 9, 2013 at 3:05
  • 1
    If you use apt-get to install things, it will take care of any messing up that could happen. If you use dpkg to install things however...
    – Lawrence
    Jul 10, 2013 at 1:40
  • 1
    help.ubuntu.com/community/AptGet/Offline/PrintUris (Although that is a ubuntu page, the functionality in question inherits from Debian and so should be at least largely shared by raspbian) Mar 6, 2015 at 19:46
  • 1
    @ChrisStratton Given the >10K view count of this question you'd get a +1 from some if you could write up the significant bits as an answer (obviously attributing it as well)... Don't forget the bit about updating the local RPi's ideas about package availability (off-line equivalent to sudo apt-get update) first.
    – SlySven
    Jan 10, 2016 at 4:52
  • @lenik not sure about it... dpkg checks all dependencies too. Feb 13, 2016 at 10:11

2 Answers 2

16

Assuming you're using Raspbian, you need to find out which .deb file you need, and transfer those to your Raspberry Pi, and place them in /var/cache/apt/archives/partial, and then just use the command:

sudo dpkg -i /var/cache/apt/archives/partial/xxxx

where xxxx is the exact name of the .deb file you want to install

If you need to find dependencies, http://www.debian.org/distrib/packages will help.

Also the Raspbian repositories are located here http://archive.raspbian.org/raspbian/pool/

That's where the plain .deb files will be for the Pi.

0
10
+50

To install programs on machine unable to access internet

enter command as normal and read output look towards end of results for the failed to fetch lines and enter these links into a web capable machine, save the links to a usb memory stick. Repeat for all failed to fetch lines

*pi@raspberrypi ~/pi $ sudo apt-get install scrot 
Reading package lists... Done 
Building dependency tree       
Reading state information... Done 
The following extra packages will be installed: 
  giblib1 
....
**Failed to fetch** http://mirrordirector.raspbian.org/raspbian/pool/main/g/giblib/giblib1_1.2.4-8_armhf.deb*  

insert the usb drive you downloaded these files onto and navigate to them (easiest using startx file explorer program) in file explorer press F4 (or Tools, open current folder in terminal)

to manually install the programs in terminal enter commands bolded below. Repeat sudo dpkg -1 filename for each file downloaded.

*pi@raspberrypi /media/KINGSTON/pi install packs $ **sudo dpkg -i scrot_0.8-13_armel.deb** 
Selecting previously unselected package giblib1:armhf. 
(Reading database ... 85074 files and directories currently installed.) 
Unpacking giblib1:armhf (from scrot_0.8-13_armel.deb) ... 
Setting up giblib1:armhf (1.2.4-8) ... 
pi@raspberrypi /media/KINGSTON/pi install packs $ **sudo dpkg -i scrot_0.8-13_armhf.deb** 
Selecting previously unselected package scrot. 
(Reading database ... 85081 files and directories currently installed.) 
Unpacking scrot (from scrot_0.8-13_armhf.deb) ... 
Setting up scrot (0.8-13) ... 
Processing triggers for man-db ...* 

program should now work.

hope this makes sense

1
  • 5
    It would be better to specify the --print-uris option to apt-get than to merely wait for it to fail, but I'm not sure that warrants the downvote you have received from someone. Mar 6, 2015 at 19:45

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

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