I am using pi as my main system.

for sometime, i had to start dhclient manully to connect to the internet, to fix this, when i searched on internet, i came to know that i have both dhcpcd and dhclient installed.. so i remove dhcpcd5 isc-dhcp-client isc-dhcp-common packages by seeing the answer,

🥺 now i don't have internet

i tried connect internet manually using

sudo ip addr add dev eth0

sudo ip route add default via

but it showing error

Error:Nexthop has invalid gateway
  1. is there any way to install dhclient back without internet?
  2. any way to connect to the internet without dhcp.

thanks in advance

  • 1
    Why don't you just install a standard OS and don't fiddle with it. Networking works out of the box. If you have some reason to not use the default networking you need to explain.
    – Milliways
    Jul 14, 2022 at 10:06
  • i am using default noobs os, without gui, and i installed awesome wm and kde... my problem is, once i installed dhclient to thether phone, since then internet is not starting at boot, but in orderto fix it, i removed some packages ended up breaking the system. yesterday i had cleared apt's cache to save memory, so today i didn't even had a way to install it Jul 14, 2022 at 12:06
  • 🙂 now i just fixed it by manually downloading those pacakges to phone and trasfered it using mtp to pi, then manully installed using dpkg .. i will give this as answer Jul 14, 2022 at 12:12
  • NOOBS isn't an OS it is an installer - which Raspberry Pi Ltd. has finally had the decency to discontinue and has never been default. Do yourself a favour and install Raspberry Pi OS.
    – Milliways
    Jul 14, 2022 at 12:14
  • i have been using it for 8 months, i have many importing files in it, and there is no other system with me, except for my compnys one , where i canot install enything else... also this is really customised 😄, so until i get a new system, i have no plan to update it, as this works for me .. and i know noobs is installer, but i meant, i installed the offical one from the installer ... Jul 14, 2022 at 13:02

1 Answer 1


🙂 i fixed it my self..

i checked


and find out exact version of pacakges i accidentally uninstalled and gone to http://archive.raspberrypi.org/debian/dists/bullseye/main/binary-arm64/Packages


and find out location of exact package name

then eg:

Package: dhcpcd5
Version: 1:8.1.2-1+rpt5
Architecture: arm64
Maintainer: Scott Leggett <[email protected]>
Installed-Size: 424
Depends: lsb-base (>= 3.0-6), libc6 (>= 2.28), libudev1 (>= 183)....
Filename: pool/main/d/dhcpcd5/dhcpcd5_8.1.2-1+rpt5_arm64.deb

exits in


download it in phone.. connect phone to pi using usb cable, transfer it to pi

then install it using

sudo dpkg -i <pkgname>.deb

start dhcp using

sudo dhclient 

volla! we have internet! 🙂 now i can go and study for tomorrow's exam

Note : i recently had removed my apt's cache using

sudo apt clean

otherwise i would have that deb pacakges in


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.