Re: Error when installing updates: "Package operation failed"
You could try to clean things up a bit by manually editing some files, especially if you are not using the packages providing the errors.
For the VirtualBox 3.1 status error:
Code:
sudo cp /var/lib/dpkg/status /var/lib/dpkg/status.copy # Make a backup copy
gksu gedit /var/lib/dpkg/status
Find the entry for VirtualBox: "Package: virtualbox-3.1"
Remove the entire section (all the way down to the next "Package: " line and save the file.
For samba4, try renaming the script causing the problem. This is not a fix, but a workaround that might prevent the error message from appearing:
Code:
sudo mv /var/lib/dpkg/info/samba4.postinst /var/lib/dpkg/info/samba4.postinst.bad
If the file is not found:
Code:
gksu nautilus /var/lib/dpkg/info
and search for a samba4 file ending with ".postinst" and rename it.
If you no longer get the error message when running "sudo apt-get upgrade", try removing the samba4 package and then reinstalling it (if you need it).
Re: Error when installing updates: "Package operation failed"
Thanks! that did seem to help. I still get an error message regarding virtualbox but no error message regarding samba. I removed samba by typing "sudo apt-get remove samba". Below is the output of the upgrade, hi highlited in red the errors i found, but I don't know what to make of this output.
Code:
marco@marco-laptop:~$ sudo apt-get upgrade
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages will be upgraded:
firefox firefox-branding firefox-globalmenu firefox-gnome-support
firefox-locale-en libcurl3 libcurl3-gnutls skype
8 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
1 not fully installed or removed.
Need to get 39.6 MB of archives.
After this operation, 0 B of additional disk space will be used.
Do you want to continue [Y/n]? y
Get:1 http://archive.canonical.com/ubuntu/ natty/partner skype i386 2.2.0.35-0natty1 [23.6 MB]
Get:2 http://us.archive.ubuntu.com/ubuntu/ natty-updates/main firefox-globalmenu i386 5.0+build1+nobinonly-0ubuntu0.11.04.2 [51.9 kB]
Get:3 http://us.archive.ubuntu.com/ubuntu/ natty-updates/main firefox i386 5.0+build1+nobinonly-0ubuntu0.11.04.2 [15.2 MB]
Get:4 http://us.archive.ubuntu.com/ubuntu/ natty-updates/main firefox-branding i386 5.0+build1+nobinonly-0ubuntu0.11.04.2 [14.4 kB]
Get:5 http://us.archive.ubuntu.com/ubuntu/ natty-updates/main firefox-gnome-support i386 5.0+build1+nobinonly-0ubuntu0.11.04.2 [14.7 kB]
Get:6 http://us.archive.ubuntu.com/ubuntu/ natty-updates/main firefox-locale-en all 5.0+build1+nobinonly-0ubuntu0.11.04.2 [377 kB]
Get:7 http://us.archive.ubuntu.com/ubuntu/ natty-updates/main libcurl3 i386 7.21.3-1ubuntu1.2 [220 kB]
Get:8 http://us.archive.ubuntu.com/ubuntu/ natty-updates/main libcurl3-gnutls i386 7.21.3-1ubuntu1.2 [211 kB]
Fetched 39.6 MB in 2min 20s (282 kB/s)
dpkg: warning: parsing file '/var/lib/dpkg/available' near line 23543 package 'jre':
error in Version string '1.6.0_14-fcs-1': invalid character in version number
dpkg: warning: parsing file '/var/lib/dpkg/available' near line 57698 package 'virtualbox-3.1':
error in Version string '3.1.6-59338_Ubuntu_karmic': invalid character in revision number
(Reading database ... 399348 files and directories currently installed.)
Preparing to replace firefox-globalmenu 5.0+build1+nobinonly-0ubuntu0.11.04.1 (using .../firefox-globalmenu_5.0+build1+nobinonly-0ubuntu0.11.04.2_i386.deb) ...
Unpacking replacement firefox-globalmenu ...
Preparing to replace firefox 5.0+build1+nobinonly-0ubuntu0.11.04.1 (using .../firefox_5.0+build1+nobinonly-0ubuntu0.11.04.2_i386.deb) ...
Unpacking replacement firefox ...
Preparing to replace firefox-branding 5.0+build1+nobinonly-0ubuntu0.11.04.1 (using .../firefox-branding_5.0+build1+nobinonly-0ubuntu0.11.04.2_i386.deb) ...
Unpacking replacement firefox-branding ...
Preparing to replace firefox-gnome-support 5.0+build1+nobinonly-0ubuntu0.11.04.1 (using .../firefox-gnome-support_5.0+build1+nobinonly-0ubuntu0.11.04.2_i386.deb) ...
Unpacking replacement firefox-gnome-support ...
Preparing to replace firefox-locale-en 5.0+build1+nobinonly-0ubuntu0.11.04.1 (using .../firefox-locale-en_5.0+build1+nobinonly-0ubuntu0.11.04.2_all.deb) ...
Unpacking replacement firefox-locale-en ...
Preparing to replace libcurl3 7.21.3-1ubuntu1 (using .../libcurl3_7.21.3-1ubuntu1.2_i386.deb) ...
Unpacking replacement libcurl3 ...
Preparing to replace libcurl3-gnutls 7.21.3-1ubuntu1 (using .../libcurl3-gnutls_7.21.3-1ubuntu1.2_i386.deb) ...
Unpacking replacement libcurl3-gnutls ...
Preparing to replace skype 2.2.0.25-1maverick1 (using .../skype_2.2.0.35-0natty1_i386.deb) ...
Unpacking replacement skype ...
Processing triggers for man-db ...
Processing triggers for menu ...
Processing triggers for bamfdaemon ...
Rebuilding /usr/share/applications/bamf.index...
Processing triggers for desktop-file-utils ...
Processing triggers for python-gmenu ...
Rebuilding /usr/share/applications/desktop.en_US.utf8.cache...
Processing triggers for python-support ...
Setting up samba4 (4.0.0~alpha15~git20110124.dfsg1-2ubuntu1) ...
Setting up firefox (5.0+build1+nobinonly-0ubuntu0.11.04.2) ...
Please restart all running instances of firefox, or you will experience problems.
Setting up firefox-globalmenu (5.0+build1+nobinonly-0ubuntu0.11.04.2) ...
Setting up firefox-branding (5.0+build1+nobinonly-0ubuntu0.11.04.2) ...
Setting up firefox-gnome-support (5.0+build1+nobinonly-0ubuntu0.11.04.2) ...
Setting up firefox-locale-en (5.0+build1+nobinonly-0ubuntu0.11.04.2) ...
Setting up libcurl3 (7.21.3-1ubuntu1.2) ...
Setting up libcurl3-gnutls (7.21.3-1ubuntu1.2) ...
Setting up skype (2.2.0.35-0natty1) ...
Processing triggers for menu ...
Processing triggers for libc-bin ...
ldconfig deferred processing now taking place
Re: Error when installing updates: "Package operation failed"
These commands should refresh the 'available' list and may eliminate the current error message regarding it:
Code:
sudo dpkg --clear-avail
sudo apt-get update
Re: Error when installing updates: "Package operation failed"
Thank! I installed some upgrades that appeared today and I did not get any more error messages this time.
Re: Error when installing updates: "Package operation failed"
The message "Package Operation Failed" is appearing for all installations using the Ubuntu Software center. However the apps are successfully installed.