LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Ubuntu (https://www.linuxquestions.org/questions/ubuntu-63/)
-   -   apt error after upgrade and 'apt-get -f install' does not sort it out (https://www.linuxquestions.org/questions/ubuntu-63/apt-error-after-upgrade-and-apt-get-f-install-does-not-sort-it-out-923504/)

zimgir 01-12-2012 06:09 PM

apt error after upgrade and 'apt-get -f install' does not sort it out
 
Greetings. Apt broke with conflicts between some libreoffice packages today after an 'apt-get upgrade'. There were several packages that broke. I restarted and it wouldn't boot up at all because of some error. After a few tries with old kernels I got in and figured out how to upgrade to the new kernel. That seems to have helped but some packages still show the conflict. I would have remembered more about this but I didn't think I'd be here asking for help so I hope that is sufficient. The terminal readout is below. Many thanks.

Some disclosure, My HDD failed last week and I had not got around to installing the nvidia drivers yet in my new install, so the problems on restart might be a combination promlem and may not be all that relevant.

Code:

gir@steamie:~$ sudo apt-get -f install
Reading package lists... Done
Building dependency tree     
Reading state information... Done
Correcting dependencies... Done
The following package was automatically installed and is no longer required:
  libreoffice-l10n-common
Use 'apt-get autoremove' to remove them.
The following extra packages will be installed:
  libhunspell-1.3-0 libreoffice-common libreoffice-core
  libreoffice-style-oxygen librsvg2-2
Suggested packages:
  libreoffice-style-hicontrast libreoffice-style-tango
  libreoffice-style-crystal kde-icons-oxygen oxygencursors librsvg2-bin
The following packages will be REMOVED:
  libreoffice-l10n-en-gb libreoffice-l10n-en-za
The following NEW packages will be installed:
  libhunspell-1.3-0
The following packages will be upgraded:
  libreoffice-common libreoffice-core libreoffice-style-oxygen librsvg2-2
4 upgraded, 1 newly installed, 2 to remove and 696 not upgraded.
66 not fully installed or removed.
Need to get 0 B/61.4 MB of archives.
After this operation, 7,953 kB disk space will be freed.
Do you want to continue [Y/n]? y
(Reading database ... 127998 files and directories currently installed.)
Preparing to replace libreoffice-core 1:3.4.3-3ubuntu2 (using .../libreoffice-core_1%3a3.5.0~beta2-2ubuntu2_amd64.deb) ...
rmdir: failed to remove `usr/lib/libreoffice/basis3.4/program/': Directory not empty
dpkg: error processing /var/cache/apt/archives/libreoffice-core_1%3a3.5.0~beta2-2ubuntu2_amd64.deb (--unpack):
 subprocess new pre-installation script returned error exit status 1
Errors were encountered while processing:
 /var/cache/apt/archives/libreoffice-core_1%3a3.5.0~beta2-2ubuntu2_amd64.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)


David the H. 01-12-2012 10:09 PM

Sometimes you have to read the error messages carefully and do a bit of guesswork to figure out solutions.

The only line that explicitly states what happened is this:
Code:

rmdir: failed to remove `usr/lib/libreoffice/basis3.4/program/': Directory not empty
Usually this kind of error doesn't cause the whole installation to fail, but maybe it's something necessary this time. I don't know. First see what's in that directory that's causing it to fail. Then either move it out, or just rename the directory away, and re-running the command. You may need to use "apt-get install -f" first. If everything works correctly, you should be able to delete them permanently.

Speaking of which, it's often a good idea to pay careful attention whenever apt wants to remove a package. It can sometimes want to uninstall optional packages that you may actually want to keep.

Finally, while probably not the case here, remember that most errors caused by package conflicts tend to be temporary. Often you just have wait a few days until they get resolved upstream.


All times are GMT -5. The time now is 06:12 AM.