Tuesday, November 22, 2016

installation - How to install Gnome Shell latest version in Offline-mode?




I can't using


sudo apt-get install gnome-shell


Because, My Internet connection is very slow, So I want to download the packages first and copy them to my Laptop.



I've had many friends' computer where I required to install Ubuntu as well essential post-install tasks (like installing required Packages for playing restricted media formats, GNOME Shell, etc.) What I do is as follows:


Get the Packages



  • Get to a computer where there's a decent internet connection, and boot from Ubuntu LiveCD or Bootable Flash Drive.

  • Firstly, update the package repositories (from Update Manager by clicking "Check", which updates entire package cache).

  • Then install Synaptic from Software Center.

  • And now the real work starts from Synaptic.

  • Open Synaptic and first hit "Reload", when its done, click "Mark All Upgrades" and then hit "Apply", this will bring a dialog that shows packages to be updated, below that is a checkbox that says "Download Package Files Only".


Package Installation Confirmation Dialog



  • Just mark that checkbox so it'll not install anything and just download the packages and keep it in the cache.

  • When its done, install other packages that you'll need, like ubuntu-restricted-extras, vlc, gnome-shell, etc.

  • Mark the mentioned packages (it'll also mark required dependencies) just DON'T forget to check that "Download Package Files Only" option, when you click apply after marking all the packages.

  • The reason why we're ONLY downloading the packages instead of installing is pretty simple that we don't wanna install anything in the Live session of Ubuntu.

  • Once, download of all the packages is done, open nautilus (i.e. file manager) and navigate to /var/cache/apt/archives.

  • You'll see here all the packages that you downloaded using Synaptic, along with two other things, a file lock and a folder partial.

  • Just copy all the .deb files from that location ignoring that lock file and partial folder.

  • And paste the packages in some other partition or a flash drive where you can keep it for later use.

  • What we did in above steps is downloaded the packages for the updates for Ubuntu released so-far, and the apps that we need after installing Ubuntu on our target machine.


Installing the Packages



  • Now that we have all the required packages, install Ubuntu.

  • Please note that though we have all the packages downloaded, we still need an internet connection on a target machine (its absolutely fine if the connection is slow as we'll not be needing faster connection now).

  • Once, installation is done and you login to Ubuntu Desktop, open Nautilus as root by running gksu nautilus, and then navigate again to /var/cache/apt/archives.

  • Now, paste all the packages here which we downloaded earlier in live Ubuntu session, and close Nautilus.

  • Again, update the package repositories using Update Manager as mentioned above in very 2nd point. (this is the task why we need internet connection, but, updating package cache shouldn't take long even on computer with slow internet connection)

  • Now you'll see list of available updates in the Update Manager, but also, you'll see a notice below the list that says "updates already downloaded". You can now safely install Updates and it won't download anything now.

  • Similarly, you can open Software Center and install the packages which you downloaded earlier, and none of them will require to download anything further.

  • This is how you can save bandwidth as well as install the packages which are already downloaded.


Note: There are other ways too which can be used to install packages offline, like using APTonCD or running sudo dpkg -i *.deb in a folder where downloaded packages exist, but I don't know why but I don't like APTonCD and the send option often causes dependency issues or in worst cases, broken installation.


Also, note that it may happen that you need internet connection while installing the package from Synaptic, but with this method, the need to download anything during installation will be negligible.


I know this is pretty long list of instructions, but believe me once you get used to it (I do this at every release of Ubuntu to install it on computers with limited internet connection) it is fairly easier. And also, it doesn't require any 3rd-party app to perform the task and you'll also learn something while doing this. :-)


No comments:

Post a Comment

11.10 - Can't boot from USB after installing Ubuntu

I bought a Samsung series 5 notebook and a very strange thing happened: I installed Ubuntu 11.10 from a usb pen drive but when I restarted (...