1

I just updated my 32-bit Ubuntu 12.04 to 64-bit version by taking the following steps:

  • Made a tarball of my home (not really important)
  • Saved dpkg --get-selections
  • Made a tarball of /etc/apt
  • Format and install latest 64-bit Ubuntu 12.04
  • Overwrite home with the old home (again, not important)
  • Overwrite /etc/apt

and to reinstall the old applications, I tried following from here, so I did:

$ sudo apt-get install dselect
$ sudo dpkg --set-selections < ~/Package.list
$ sudo apt-get dselect-upgrade

But, that was asking me to remove a lot of 64-bit packages and install the 32-bit versions of them. I didn't quite figure out how to reset the selection, so I just went ahead and uninstalled dselect.

Then I decided to go with a more manual method. Having the old dpkg --get-selections output (call the file packages), I did the following:

# take packages marked as deinstall
$ awk '/deinstall/{ print $1 }' < packages > deinstall
# and remove them
$ while read p; do sudo apt-get remove "$p" -y; done < deinstall

The removed packages were nothing weird. In fact, they were:

appmenu-gtk
appmenu-gtk3
asymptote
indicator-appmenu
libfltk-cairo1.3
libfltk-gl1.3
libgc1c2
libgsl0ldbl
liboverlay-scrollbar-0.2-0
liboverlay-scrollbar3-0.2-0
libsigsegv2
libubuntuoneui-3.0-1

Then I did the same to install old packages (here I realized invoking apt-get install per package is too slow, so I did them all together):

# take packages marked as install
$ awk '/\tinstall/{ print $1 }' < packagespackages > install
# and install them
$ xargs sudo apt-get install -y < install

However, before doing that, I removed the packages that started with X, to make sure it doesn't do anything with X.

Doing this, it still told me some X related packages would be removed, but at the same time it said some other X related packages would be installed, so I let it do it.

Finally, what happened is the following:

  1. On restart, X didn't run. Trying FailsafeX said that /usr/bin/X does not exist. Following its suggestions, I did:

    $ cd /usr/bin; ln -s Xorg X
    
  2. On restart, X ran ok and everything is ok.

  3. When I do something with apt-get, it tells me that:

    The following packages were automatically installed and are no longer required:
      x11-apps libwayland-ltss-server0 xserver-xorg-input-vmmouse
      x11-session-utils appmenu-qt xserver-xorg-input-evdev x11-xfs-utils
      libxrandr-ltss2 xserver-xorg-input-wacom xinit xserver-xorg-input-mouse
      libxcb-xfixes0 libwayland-ltss-client0 xserver-xorg-input-synaptics
      libllvm3.3
    

So here's my question. should I remove those packages? How can I make sure I have alternative packages so everything would work ok on restart? If I shouldn't remove these packages, how can I make apt understand that the system depends on them?

2
  • Did you, for some reason, remove the ubuntu-desktop metapackage?
    – muru
    Jul 29, 2014 at 8:48
  • @muru, it seems so. Trying to install it says that it depends on xorg, but it's not going to be installed. Installing that says it has unmet dependencies. Do you know how I can automatically fix that (instead of tracing the packages manually one by one?
    – Shahbaz
    Jul 29, 2014 at 9:37

2 Answers 2

1

As muru correctly suggested, ubuntu-desktop had somehow got uninstalled. It looks like somehow I had managed to replace X with wayland (maybe).

Installing ubuntu-desktop complained about broken packages xserver-xorg and xorg. Installing them, ubuntu-desktop was installed alright (and /usr/bin/X wad replaced). Apt still said some wayland packages are no longer needed, which I just autoremoved.

0

You could do the following steps next time the issue appears (Which are a bit excessive) but are used for cases where packages become annoying:

sudo apt-get check
sudo apt-get clean
sudo apt-get autoclean
sudo apt-get autoremove
sudo dpkg --configure -a
sudo apt-get -f install

With that the packages should all be correct. There are worst cases where you would need to call upon the powers of dkpg and it's --force-remove-reinstreq or --force-overwrite parameters in order to "fix" the package.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .