How to reinstall network manager without internet access?

http://askubuntu.com/questions/422928/how-to-reinstall-network-manager-without-internet-access

4
down vote
If you’ve recently upgraded your network manager you can use sudo apt-get install –reinstall network-manager, but this only works if the package is still in your Apt cache (/var/cache/apt/archives/). I’m guessing you haven’t so you’ll have to do things the long way, but I thought I’d throw that in just in case.

Boot a Ubuntu live CD in „Try without installing“. Make sure you are connected to the internet.

In terminal type:

sudo mount –bind /dev /<chrootlocation>/dev
sudo mount –bind /proc /<chrootlocation>/proc
sudo mount –bind /sys /<chrootlocation>/sys
sudo cp /etc/resolv.conf /<chrootlocation>/etc/resolv.conf
sudo chroot /<chrootlocation>
You will need to replace <chrootlocation> with the appropriate location of your Ubuntu install, typically the label of the partition it’s installed on. The partition must also be mounted so that you can access it.

Edit your /etc/resolve.conf and add at least one nameserver:

nameserver 8.8.8.8 # Google Public DNS
In terminal type:

sudo apt-get update
sudo apt-get install network-manager
If you don’t you’ll likely get an unable to connect error.

In terminal type exit. This exits you from the chroot environment.

In terminal type sudo reboot to reboot your computer.

How to reinstall network manager without internet access?