Showing posts with label imitation is the highest form of flattery. Show all posts
Showing posts with label imitation is the highest form of flattery. Show all posts

Thursday, January 19, 2017

Install a package without internet

So first of all, this isn't original.  Credit goes here.  But it's fantastic, and I wish I'd known about this a long time ago.  As usual, for my own memory/use: and actually, I'm just going to clean up what the other guy said.  He did a great job.

On the Internet-less computer:

In the terminal enter:
PACKAGENAME=<The name of the Package to install>
and then
apt-get -qqs install $PACKAGENAME | grep Inst | awk '{print $2}' | xargs apt-cache show | grep 'Filename: ' | awk '{print $2}' | while read filepath; do echo "wget \"http://archive.ubuntu.com/ubuntu/${filepath}\""; done >downloader.sh
A ready-to-use downloader for the package has now been created in the home folder.  Open your home directory in the file browser and move the file downloader.sh to the top-level directory of your flash drive.  Then eject your flash drive.

On the computer with Internet:

Insert your flash drive, and open your flash drive in the file browser.  Copy the location of your flash drive:
[CTRL]-L
[CTRL] C 
Move into the directory of the flash drive.  In a terminal this time, type:
cd [CTRL]+[SHIFT]+V 
Run the downloader:
bash ./downloader.sh
Wait for the download to complete and eject your flash drive.

Back to the Internet-less computer:

Open your flash drive in the file browser.  In the browser, type the following to copy the file location of the flash drive.
[CTRL]-L
[CTRL]-C
Move into the directory of the flash drive.  In a terminal this time, type:
cd [CTRL]+[SHIFT]+V 
sudo dpkg --install *.deb
That's it!

Final post here

I'm switching over to github pages .  The continuation of this blog (with archives included) is at umhau.github.io .  By the way, the ...