Don’t have Internet?

Well, this is a common problem we face due to many reasons. Don’t worry, we have a solution. 🙂

We’ll see the solutions for,

  1. You don’t have a good Internet connection at home or don’t have Internet at all.
  2. You have Internet, but not working in Arch.

First things first. Have you upgraded your system? If not, do it..!!!

If you have the 1st problem mentioned here, here is the trick.

  1. Install packages offline
    Well, you really don’t need to have an Internet connection in your PC to install packages. You can download them from another computer with a better Internet connection and bring it to your computer then install.

    • For the first time upgrade
      You have to update the mirror list by downloading the mirrorlist file from arch website and place it as /etc/pacman.d/mirrorlist and un-comment the corresponding mirror by removing # before the preferred server. This list is available at  http://www.archlinux.org/mirrorlist/all/.
      Then run $ sudo pacman -Syy to refresh the repository. (This only runs with an internet connection. If you don’t have an Internet connection, you are gonna have a bad time)
      Then run $ sudo pacman -Syu for a full upgrade. (If you don’t want to download, don’t press y, but just copy the package names+versions you are required.)
      Then download those packages separately from the mirror site or any other source. Then you will get a bunch of .tar.xz files and copy them in to /var/cache/pacman/pkg/ in your arch installation.
      Now run  $ sudo pacman -Syu and your system will be upgraded smoothly.
    • For usual package installation, you can download the needed package then run
      $ sudo pacman -U path/to/file

      Ex :

      $ sudo pacman -U ~/Downloads/libpng-1.6.3-1.tar.xz

      Done..!!!

  2. Making Internet workThis problem may be occurred because the NetworkManger or/and ModemManager are not enabled. You may try
    $ sudo systemctl enable NetworkManager && sudo systemctl start NetworkManager
    $ sudo systemctl enable ModemManager && sudo systemctl start ModemManager

    This will enable and start both Network Manager and Modem Manager. Even this won’t help, try following.I’m using a USB HSPA modem and personally I have faced this problem after the full upgrade. The reason was the new ModemManager and/or NetworkManager do not support my modem. In some cases, Network Manager applet shows your connection, but can’t connect to the Internet. Sometimes even the connection is not shown.So I have to downgrade those packages or ignore them when upgrading.If you don’t have the older package (I’m still using ModemManager 0.7.990 and NetworkManager 0.9.8.0) you have to download them and install it as above with -U option.When you upgrading, instead of just using -Syu, use –ignore to mention the packages to be ignored by being upgraded.

    For that, run

    $ sudo pacman -Syu --ignore ModemManager,NetworkManager

    You can mention any package to be ignored by separating them by commas. For more info, visit man page of pacman.

    You may have to restart the ModemManager and NetworkManager after the upgrade. For that you can use the systemctl command as following.

    $ sudo systemctl restart NetworkManager && sudo systemctl restart

Leave a Reply