Saved (yet another time) by an external solver for apt!

Did you know that you can ask apt-get to invoke an external solver for handling the dependency hell that sometimes plagues your upgrades? Well, just now, again, this feature saved my day, and it is just a matter of typing a short option!

Instead of the standard

apt-get install libreoffice

that failed to propose a decent upgrade, as detailed later, I typed

 apt-get --solver aspcud install libreoffice

that returned this pretty good solution

apt-get --solver aspcud install libreoffice
Reading package lists...
Building dependency tree...
Reading state information...
Execute external solver...
The following extra packages will be installed:
  coinor-libcbc3 coinor-libcgl1 coinor-libclp1 coinor-libcoinmp1
  coinor-libcoinutils3 coinor-libosi1 libabw-0.1-1 libcdr-0.1-1
  libe-book-0.1-1 libetonyek-0.1-1 libfreehand-0.1-1 libgltf-0.0-0
  libmspub-0.1-1 libmwaw-0.3-3 libodfgen-0.1-1 liborcus-0.8-0 libpython3.4
  libpython3.4-minimal libpython3.4-stdlib libreoffice-base
  libreoffice-base-core libreoffice-base-drivers libreoffice-calc
  libreoffice-common libreoffice-core libreoffice-draw libreoffice-gtk
  libreoffice-impress libreoffice-java-common libreoffice-math
  libreoffice-style-galaxy libreoffice-style-tango libreoffice-writer
  libvisio-0.1-1 python3-uno python3.4 python3.4-minimal uno-libs3 ure
Suggested packages:
  hyphen-hyphenation-patterns libreoffice-gnome libreoffice-kde
  libreoffice-grammarcheck libreoffice-l10n-4.3 myspell-dictionary unixodbc
  gstreamer1.0-ffmpeg libreoffice-officebean libreoffice-gcj
  libreoffice-report-builder libjtds-java libreoffice-mysql-connector
  libmyodbc libmysql-java libreoffice-sdbc-postgresql odbc-postgresql
  libpg-java libsqliteodbc tdsodbc mdbtools ocl-icd-libopencl1
  libreoffice-style-crystal libreoffice-style-hicontrast
  libreoffice-style-oxygen libreoffice-style-sifr fonts-crosextra-caladea
  fonts-crosextra-carlito python3.4-venv python3.4-doc
The following NEW packages will be installed:
  coinor-libcbc3 coinor-libcgl1 coinor-libclp1 coinor-libcoinmp1
  coinor-libcoinutils3 coinor-libosi1 libabw-0.1-1 libcdr-0.1-1
  libe-book-0.1-1 libetonyek-0.1-1 libfreehand-0.1-1 libgltf-0.0-0
  libmspub-0.1-1 libmwaw-0.3-3 libodfgen-0.1-1 liborcus-0.8-0 libvisio-0.1-1
The following packages will be upgraded:
  libpython3.4 libpython3.4-minimal libpython3.4-stdlib libreoffice
  libreoffice-base libreoffice-base-core libreoffice-base-drivers
  libreoffice-calc libreoffice-common libreoffice-core libreoffice-draw
  libreoffice-gtk libreoffice-impress libreoffice-java-common libreoffice-math
  libreoffice-style-galaxy libreoffice-style-tango libreoffice-writer
  python3-uno python3.4 python3.4-minimal uno-libs3 ure
23 upgraded, 17 newly installed, 0 to remove and 1864 not upgraded.

So, next time you run into trouble, try the external solver, and wait the extra time (maybe 30 seconds)... it may be well worth the wait.

Just make sure you have aspcud and apt-cudf installed for this to work!

For the curious (or masochists) following this blog, here is what I got when I first tried using apt-get (Version: 1.0.6):

apt-get install libreoffice
Reading package lists... 
Building dependency tree... 
Reading state information... 
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:
The following packages have unmet dependencies:
 libreoffice : Depends: python3-uno (>= 4.0~) but it is not going to be installed or
                        python-uno but it is not going to be installed
E: Unable to correct problems, you have held broken packages.

And yes, I also tried aptitude (Version: 0.6.11-1), which led to some interesting interactions, of which only the beginning is reported below

Reading package lists...
Building dependency tree...
Reading state information...
Initializing package states...
Reading task descriptions...
Building tag database...
The following NEW packages will be installed:
  coinor-libcbc3{a} coinor-libcgl1{a} coinor-libclp1{a} 
  coinor-libcoinmp1{a} coinor-libcoinutils3{a} coinor-libosi1{a} 
  libabw-0.1-1{a} libcdr-0.1-1{a} libe-book-0.1-1{a} libetonyek-0.1-1{a} 
  libfreehand-0.1-1{a} libgltf-0.0-0{a} libmspub-0.1-1{a} libmwaw-0.3-3{a} 
  libodfgen-0.1-1{a} liborcus-0.8-0{a} libvisio-0.1-1{a} 
The following packages will be REMOVED:
  latex-sanskrit{u} libabw-0.0-0{u} libass4{u} libavcodec54{u} 
  libavformat54{u} libboost-date-time1.54.0{u} libboost-python1.54.0{u} 
  libcdr-0.0-0{u} libcmis-0.3-3{u} libe-book-0.0-0{u} libepub0{u} 
  libetonyek-0.0-0{u} libfreehand-0.0-0{u} libgnutls28:i386{u} 
  liblist-allutils-perl{u} liblivemedia23{u} libmozjs24d{u} 
  libmspub-0.0-0{u} libmwaw-0.1-1{u} libmwaw-0.2-2{u} libodfgen-0.0-0{u} 
  libokularcore3{u} liborcus-0.6-0{u} libproxy-tools{u} libpython3.3{u} 
  libpython3.3-minimal{u} libpython3.3-stdlib{u} 
  libtracker-sparql-0.16-0{u} libts-dev{u} libusageenvironment1{u} 
  libvisio-0. 0-0{u} libwps-0.2-2{u} libzip2{u} luatex{u} 
  nepomuk-core-runtime{u} python3.3{u} python3.3-minimal{u} 
  shared-desktop-ontologies{u} texlive-luatex{u} xulrunner-24.0{u} 
The following packages will be upgraded:
  libreoffice libreoffice-base libreoffice-base-core 
  libreoffice-base-drivers libreoffice-calc libreoffice-common 
  libreoffice-core libreoffice-draw libreoffice-gtk libreoffice-impress 
  libreoffice-java-common libreoffice-style-galaxy libreoffice-style-tango 
  libreoffice-writer uno-libs3 
15 packages upgraded, 17 newly installed, 40 to remove and 1865 not upgraded.
Need to get 85.4 MB of archives. After unpacking 96.1 MB will be freed.
The following packages have unmet dependencies:
 ure : Depends: uno-libs3 (= 4.2.5-1+b1) but 4.3.3git20141011-1 is to be installed.
 python3-uno : Depends: libreoffice-core (= 1:4.2.5-1+b1) but 1:4.3.3git20141011-1 is to be installed.
 libreoffice-math : Depends: libreoffice-core (= 1:4.2.5-1+b1) but 1:4.3.3git20141011-1 is to be installed.
The following actions will resolve these dependencies:
      Remove the following packages:         
1)      libreoffice                          
2)      libreoffice-avmedia-backend-gstreamer
3)      libreoffice-base                     
4)      libreoffice-base-core                
5)      libreoffice-base-drivers             
6)      libreoffice-calc                     
7)      libreoffice-common                   
8)      libreoffice-core                     
9)      libreoffice-draw                     
10)     libreoffice-gtk                      
11)     libreoffice-help-en-us               
12)     libreoffice-impress                  
13)     libreoffice-java-common              
14)     libreoffice-math                     
15)     libreoffice-report-builder-bin       
16)     libreoffice-sdbc-firebird            
17)     libreoffice-sdbc-hsqldb              
18)     libreoffice-writer                   
19)     libreoffice-writer2latex             
20)     mythes-en-us                         
21)      python3-uno                          
22)     ure
Accept this solution? (Y/n/q/?) n