Ubuntu – Installing Brasero removes 100+ packages and impairs internet and display manager


I was thinking to have solved one problem with Paraview but have come across a bigger one with Brasero.

  1. A few days ago I wanted to install Paraview (amd64) in my computer (x68_64, Ubuntu 12.04 LTS) where, among others, Google-Earth and Skype used i386 libraries. This generational conflict caused apt-get to ask the removal of those older packages and attending libraries.
    (Kudos to Sneetsher for pointing me to this.)
    In the end, I managed to get Paraview, Skype and Google Earth properly installed and functioning after having run apt-get -f install, that is a general overhaul of broken dependencies. I did so on suggestion of apt-get itself.
  2. However, while apt-get -f install was tending to its task, I noticed that some applications were disappearing from the desktop menu. I considered this natural, hence I moved on to reinstalling those. The installation of Banshee as first go went well (I can't recall whether using apt-get or dpkg). With Brasero came the fun.
  3. After commanding apt-get install brasero, apt-get asks me to remove another large number of libraries, in the order of hundreds. Mistakenly I consider those applications to add and give my go ahead. At the end of this spree of autoimmune exuberance, the first evidence is that the browser cannot connect to URLs any longer — thus the internet connectivity is knocked off. I then give the reboot a chance. The system goes through the POST seamlessly, then it hangs on the Ubuntu splash screen.
  4. Cutting the long story short, I managed to reboot in recovery mode and get to a responsive command line terminal. As the POST rolls through its checks, I can see that it fails on starting LightDM Display Manager (but maybe somewhere else that I miss).

Now the state of the play from the recovery-mode command line:

  • ping yields a 'user unknown'
  • xterm yields a 'display is not set'
  • both lightdm and gdm yield a 'currently not installed'
  • dpkg-reconfigure lightdm yields a 'broken or not fully installed'
  • apt-get install lightdm gives a streak of 'failed to fetch' arguably because the internet has been cut out (checked out that the cable is in place)
  • I can see the external drives though!

Hence I was thinking to circumvent the internet cut-out by saving a bridgehead of deb files on one of those drives and then running dpkg or apt-get on them from the command line. Clearly, I am not so much in favour of reinstalling the whole OS.

Does it make sense to you?
If it does, the questions are

  1. Which packages and dependencies would be able to restore the internet connection?
  2. Since the dependencies could easily be in the order of tens if not hundreds, is there a place where these are conveniently zipped/tarred in a single bundle? Of course I can't rely on remote fetching.
  3. Say I manage to restore the internet connectivity, then I will be able to fetch the remote repositories. Which commands should I run to make sure that all 'broken pieces' are rescued and restored?
  4. Why on Earth did Brasero needed to remove 100+ library packages of essential nature? This seems truly excessive to me!

Thanks for having patiently read this long post. I look forward to your answers and remarks.

Update: requested outputs

Best Answer

  1. Boot to recovery then drop to shell
  2. Check the network interfaces available.

    ifconfig -a

    If you don't see IP address (x.x.x.x), run DHCP query to get an IP, change eth0 with yours.

    dhclient eth0
  3. Confirm connection

    ping -c3 ubuntu.com

    You should get an output similar to this:

    3 packets transmitted, 3 received, 0% packet loss
  4. Check dpkg multi-arch setup

    $ dpkg --print-architecture
    $ dpkg --print-foreign-architectures
    $ grep -ir arch /etc/dpkg/ 
    /etc/dpkg/dpkg.cfg.d/multiarch:foreign-architecture i386

    If i386 doesn't show up in 2nd & 3rd command, set it:

    echo "foreign-architecture i386" > /etc/dpkg/dpkg.cfg.d/multiarch
  5. Update package list

    apt-get update
  6. Run

    apt-get install ubuntu-desktop
  7. If still getting "unmet dependencies" message, run aptitude.

    • Press / to search, write ubuntu-desktop then Enter
    • Then use n till ubuntu-desktop selected, NOT ubuntu-desktop:i386
    • + to flag it for installing
  8. At this point, there should be a red bar at the bottom with number [1/..] which indication the current solution from many other possible onces.

    • Press e to examine, it show what the current solution is going to do.
    • Flip through all other solutions using ./,
    • You gonna see some solutions that prefer to keep installing packages without installing ubuntu-desktop. Choose the one that remove less and installs ubuntu-desktop.

      This is not always the perfect solution, so check well then choose. Each case is specific. For current case, see this related chat room.

    • ! to apply then g, check then g again to confirm.
  9. If every thing goes OK, reboot.

  10. Then install other need tools you need, which have been removed may be.

    Notes: These from my personal experience, so I could be wrong. So if anyone experienced otherwise, please share it.

    • Avoid installing .deb binary Debian packages locally using dpkg, debi or software-center. Use repositories as possible (Ubuntu ones, PPA, Other vendors ones,...).
    • For vendors packages, look for native architecture amd64. In rare cases building source (if available) is easier then foreign arch.
    • Software-center, synaptic, apt-get and many other tools, for me they not fully support multiarch feature. They show only 1 solution and (except apt-get) don't show the architecture of each package.

      If you face any conflict, use aptitude. It shows other solutions and shows clearly all packages from all available architecture.

    • If you have to install some i386 tools with no option for amd64. Leave them to be installed the last. If you have them already installed and you are trying to install native arch amd64 packages then you get a conflict (basically unmet dependencies message). Let aptitude uninstalls the i386 ones, then run clean up with apt-get autoremove to remove residues (auto-installed dependencies from i386 arch). Install amd64 packages you wanted then try installing back the removed i386 tools.

      Why is that? If you try to install a i386 tool, all its dependencies will be installed as i386 too, even amd64 ones available and can work. Later, if you try to install another amd64 tool which have at least one overlapped dependency, you get the conflict.

      Aptitude will seem like removing the packages, but actually it is replacing some i386 packages with the corresponding amd64 ones.

      See this show case, Ubuntu 14.04, problem when install gstreamer1.0-libav, unmet dependencies