Cannot update dietpi anymore (raspberry pi 2)

Having issues with your DietPi installation, or, found a bug? Post it here.
Post Reply
shlagwuk

Cannot update dietpi anymore (raspberry pi 2)

Post by shlagwuk »

Hi,
Every time I try to update my raspberry via dietpi-update, I get the following error:

Code: Select all

curl: (6) Could not resolve host: github.com
 [Failed] Download failed, unable to run update. Please try running dietpi-update again.
After each try, I have to reset the network connexion from dietpi-config (Restart Networking), otherwise I have no connexion (I can't ping google.com).
Any idea what can be the cause of this problem?

ifconfig before update

Code: Select all

eth0      Link encap:Ethernet  HWaddr b8:27:eb:14:5a:5f
          inet addr:192.168.1.30  Bcast:192.168.1.255  Mask:255.255.255.0
          inet6 addr: fe80::ba27:ebff:fe14:5a5f/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:388656 errors:0 dropped:205 overruns:0 frame:0
          TX packets:457522 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:41936426 (39.9 MiB)  TX bytes:272719862 (260.0 MiB)

lo        Link encap:Local Loopback
          inet addr:127.0.0.1  Mask:255.0.0.0
          inet6 addr: ::1/128 Scope:Host
          UP LOOPBACK RUNNING  MTU:65536  Metric:1
          RX packets:45003 errors:0 dropped:0 overruns:0 frame:0
          TX packets:45003 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1
          RX bytes:3666166 (3.4 MiB)  TX bytes:3666166 (3.4 MiB)

tun0      Link encap:UNSPEC  HWaddr 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00
          inet addr:10.8.0.1  P-t-P:10.8.0.2  Mask:255.255.255.255
          UP POINTOPOINT RUNNING NOARP MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:14 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:100
          RX bytes:0 (0.0 B)  TX bytes:1642 (1.6 KiB)
ifconfig after update

Code: Select all

eth0      Link encap:Ethernet  HWaddr b8:27:eb:14:5a:5f
          inet addr:192.168.1.30  Bcast:192.168.1.255  Mask:255.255.255.0
          inet6 addr: fe80::ba27:ebff:fe14:5a5f/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:387300 errors:0 dropped:204 overruns:0 frame:0
          TX packets:455799 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:41718787 (39.7 MiB)  TX bytes:272471204 (259.8 MiB)

lo        Link encap:Local Loopback
          inet addr:127.0.0.1  Mask:255.0.0.0
          inet6 addr: ::1/128 Scope:Host
          UP LOOPBACK RUNNING  MTU:65536  Metric:1
          RX packets:44870 errors:0 dropped:0 overruns:0 frame:0
          TX packets:44870 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1
          RX bytes:3655113 (3.4 MiB)  TX bytes:3655113 (3.4 MiB)
User avatar
Fourdee
Site Admin
Posts: 2788
Joined: Tue Feb 06, 2007 1:36 pm

Re: Cannot update dietpi anymore (raspberry pi 2)

Post by Fourdee »

shlagwuk wrote:

Code: Select all

curl: (6) Could not resolve host: github.com
 [Failed] Download failed, unable to run update. Please try running dietpi-update again.
Any idea what can be the cause of this problem?
Hi,

Not sure, but lets try disabling IPv6 and see if the route is available, please run the following commands (you can copy and paste all into terminal):

Code: Select all

echo -e "blacklist ipv6" > /etc/modprobe.d/blacklist-ipv6.conf
sed -i "/net.ipv6.conf.all.disable_ipv6 /c\net.ipv6.conf.all.disable_ipv6 = 1" /etc/sysctl.conf
sed -i "/net.ipv6.conf.default.disable_ipv6 /c\net.ipv6.conf.default.disable_ipv6 = 1" /etc/sysctl.conf
sed -i "/net.ipv6.conf.lo.disable_ipv6 /c\net.ipv6.conf.lo.disable_ipv6 = 1" /etc/sysctl.conf

reboot
Afterwards, try running dietpi-update again and see if the result changes. If not, you can enable IPv6 by running:

Code: Select all

rm /etc/modprobe.d/blacklist-ipv6.conf &> /dev/null
sed -i "/net.ipv6.conf.all.disable_ipv6 /c\net.ipv6.conf.all.disable_ipv6 = 0" /etc/sysctl.conf
sed -i "/net.ipv6.conf.default.disable_ipv6 /c\net.ipv6.conf.default.disable_ipv6 = 0" /etc/sysctl.conf
sed -i "/net.ipv6.conf.lo.disable_ipv6 /c\net.ipv6.conf.lo.disable_ipv6 = 0" /etc/sysctl.conf
reboot
If you find our project or support useful, then we’d really appreciate it if you’d consider contributing to the project however you can.
Donating is the easiest – you can use PayPal or become a DietPi patron.
shlagwuk

Re: Cannot update dietpi anymore (raspberry pi 2)

Post by shlagwuk »

Hi,
I fixed it by switching to DHCP instead of static in network preferences.
Post Reply