4

I have been trying to install some kind of network indicator to show my current bandwidth usage on the panel on top of the screen so I decided to install https://launchpad.net/ubuntu/+source/indicator-network

But just after I have put sudo apt-get install indicator-network I have uninstalled a bunch of vital ubuntu applications e.g. network manager - which was my fault because Ubuntu warned me about it but hey! - why would it mark these applications to remove while installing just an indicator ?

Now I am unable to connect to the internet with that machine on Ubuntu. How can I install network manager back or install it from the USB boot drive with 12.04 that I have ?

Patryk
  • 9,146

3 Answers3

13

You don't need NetworkManager to connect to a network. Assuming you're using automatic configuration (probably you are) you just need to sudo dhclient eth0 to get an IP address (replace eth0 with your network device if that's the case).

Eric Carvalho
  • 54,385
  • Thanks for that - the problem for me was that I tried to do it on wireless interface wlan0 and it was impossible ( I still do not know how to do it :/ ) – Patryk Jul 15 '12 at 14:48
  • via ifconfig came to know that my eth0 is lo. sudo dhclient lo works fine but internet still not working. Any additional setting required. – Sidra Sultana Dec 24 '14 at 04:10
  • @SidraSultana lo is the loopback interface. If ifconfig show only the loopback, the other interfaces are probably "down". Run ifconfig -a to list all the interfaces; if you see an eth0, run sudo ifconfig eth0 up then sudo dhclient eth0. – Eric Carvalho Dec 25 '14 at 17:55
  • thank you so mush for your answer! I am very tired of trying to find how to make my eth work after debian installation! – Vladimir Shefer Oct 14 '20 at 22:45
2
sudo apt-get install network-manager

Will fail. Note what dependencies are needed to install the package. Mine were-

The following NEW packages will be installed:
  iputils-arping libnl-route-3-200 modemmanager network-manager network-manager-gnome usb-modeswitch usb-modeswitch-data wpasupplicant

The download will fail obviously with error:

Failed to fetch
http://us.archive.ubuntu.com/ubuntu/pool/main/libn/libnl3/libnl-route-3-200_3.2.3-2ubuntu2_amd64.deb
Could not resolve 'us.archive.ubuntu.com

Download all such links which gives above error including network-manager by some other system. I downloaded the following links-

http://us.archive.ubuntu.com/ubuntu/pool/main/libn/libnl3/libnl-route-3-200_3.2.3-2ubuntu2_amd64.deb
http://us.archive.ubuntu.com/ubuntu/pool/main/w/wpasupplicant/wpasupplicant_0.7.3-6ubuntu2.2_amd64.deb
http://us.archive.ubuntu.com/ubuntu/pool/main/i/iputils/iputils-arping_20101006-1ubuntu1_amd64.deb
http://us.archive.ubuntu.com/ubuntu/pool/main/u/usb-modeswitch-data/usb-modeswitch-data_20120120-0ubuntu1_all.deb
http://us.archive.ubuntu.com/ubuntu/pool/main/u/usb-modeswitch/usb-modeswitch_1.2.3+repack0-1ubuntu2_amd64.deb
http://us.archive.ubuntu.com/ubuntu/pool/main/m/modemmanager/modemmanager_0.5.2.0-0ubuntu2_amd64.deb
http://us.archive.ubuntu.com/ubuntu/pool/main/n/network-manager-applet/network-manager-gnome_0.9.4.1-0ubuntu2.3_amd64.deb

The links above does not contain the link of network-manager itself. You can download it from here; from a software mirror close to you. Take care to choose the appropriate architecture (amd64 for 64-bit, i386 for 32-bit), and release version of your installed OS.

Now copy the deb files to /var/cache/apt/archives/

Run sudo-apt-get install network-manager in terminal. Now it will pick up deb files from cache and will not prompt to download them. If all goes well network-manager will be installed.

Finally reboot the system.

user294673
  • 21
  • 1
0

I had the same issue. I managed to connect to wireless like this for WPA APs

wpa_passphrase networkname password > foo.conf
killall -9 wpa_supplicant
sudo wpa_supplicant -Dwext -i wlan0 -c foo.conf

If you're using WEP then than you can do it with

iwconfig wlan0 essid network
iwconfig wlan0 key password
Adam
  • 291