Wednesday, February 18, 2015

When zypper throws a "Error message: Failed to connect to xxx.xxxxxx.xxx port 80: Network is unreachable"

I enjoy running my openSUSE 13.2 off a thumbdrive because it affords me the luxury of bringing my entire Linux desktop everywhere with me. Live USB created with the current openSUSE 13.2 GNOME Live CD  (instructions are here), has ensured stuff like themes, software removed/installed and other preferences are persistent! Awesomeness!!!

All went well and I only use it when and if I decided to travel. Come the long Chinese New Year holidays and I decided to dust off the long unused Live USB and plugged it into my workhorse, DELL E6330 and ran zypper up.

Suddenly I was bombarded with a bunch of   "Error message: Failed to connect to xxx.xxxxxx.xxx port 80: Network is unreachable" .

Scouring the web has yielded the following solution:

  1. Edit the /etc/sysctl.conf file and add the following:

    net.ipv6.conf.all.disable_ipv6 = 1
    net.ipv6.conf.default.disable_ipv6 = 1
    net.ipv6.conf.lo.disable_ipv6 = 1
  2. Then execute the following:

    echo 1 > /proc/sys/net/ipv6/conf/all/disable_ipv6

 And my zypper works once again.