Almost kill my Ubuntu

I did an extremely stupid thing today.

It all started when I tried to fix some conflicting issue of OpenCV and ffmpeg. I installed and reinstalled many times. I tried this on my desktop and eventually tried it also on my laptop.

For some reasons, I could not install some required package (libxcb1-dev). It showed that there is a broken package. The only available version is 1.1.93-0ubuntu3 and it requires libxcb1 of the same version. But the installed version of the latter is 1.1.93-0ubuntu3.1. I was tired and just wanted to have some quick fix. Why just uninstalled libxcb1 and reinstalled it with the version ubuntu is happy with? Okay, surely the library is used by a long laundry list. But I was tired, what the hack? Mark, apply…

Of course, I wasn’t paying attention. It is a core library used by Gnome. So my whole desktop was gone. I was really panicking now. Good grief. Getting more troubles trying to solve a few, what an idiot I am…

I am lucky that after I rebooted my laptop, at least apt-get was still “working”. But network seemed to be down. Oh great, how can I get the network up again? I don’t want to reinstall the entire OS just because of this stupid mistake. Not to mention that I have to first backup everything. Fortunately, the network did not really die. Only the configuration for DNS was gone somehow. I setup the DNS server by adding the nameserver address (yours will be different) back to /etc/resolv.conf as described by some post on the web.

sudo echo "nameserver 192.168.2.1" > /etc/resolv.conf

After network is up, I slowly reinstalled all packages and gnome… Now, for my original problem, it turns out that my Software Sources->Updates was set to jaunty-security only. For some reason, I have installed libxcb1 of the version from jaunty-updates. Maybe after I installed Jaunty, I deselected jaunty-updates for some reasons but I don’t really remember how it ended up like this already. This probably a newbie problem but I think Ubuntu should warn us noobs when we try to deselect the default update source. No one will imagine such harmless act will “break” synaptic… Anyway, I learned my lesson today and will try to be less reckless with Ubuntu in the future.

Leave a Reply

Your email address will not be published. Required fields are marked *