Broken packages, please help! [SOLVED]

Archived topics about LMDE 1 and LMDE 2
Locked
Tomas_IV
Level 1
Level 1
Posts: 18
Joined: Tue Jun 02, 2009 11:43 am

Broken packages, please help! [SOLVED]

Post by Tomas_IV »

Hi all,
since Quantum GIS packages were not present for period of time in the repos, I had installed set of manually downloaded packages for qgis 1.8. It worked fine, but after a while package python-qgis got uninstalled during an update. It is vital for me to have Quantum GIS complete, so today I decided to give a try to one of the repos with qgis. Before installing from the repos, I first tried to completely uninstall everything QGIS related, but I did the mistake, that I first enabled the repository to install from the newer versions. It is this one:

Code: Select all

# MASTER (nightly builds)
# deb http://qgis.org/debian-nightly wheezy main
# deb-src http://qgis.org/debian-nightly wheezy main
As you can see, I have it disabled now, but it is too late. When I tried to uninstall all qgis related packages, I searched for all packages with 'qgis' in their name and selected them for purging in Synaptic. There were errors and I ended up with some broken packages and mixed set of packages for Quantum GIS 1.8 and 1.9 installed. I then tried to uninstall everything at once or individual packages through apt, apt-get, dpkg and aptitude (with the new repo disabled) with only partial success (1.9 packages are removed, but remaining 1.8 packages are not). I also have tried 'apt-get -f install' and 'sudo dpkg --configure -a' to fix the broken packages and the aptitude -f switch, respective dpkg -P --force-remove-reinstreq to purge individual packages, but to no avail.

Now I have these packages installed (libqgis1.8.0 uninstalled, but can not be purged), all of them I would like removed:

Code: Select all

c   libqgis1.8.0                    - Quantum GIS - shared libraries            
Bd  qgis                            - Geographic Information System (GIS)       
id  qgis-api-doc                    - Quantum GIS API documentation             
id  qgis-common                     - Quantum GIS - architecture-independent dat
Bd  qgis-mapserver                  - Quantum GIS mapserver                     
Bd  qgis-plugin-grass               - GRASS plugin for Quantum GIS 
All the still installed packages are the old ones, version 1.8.0+git20110724+e6558be~unstable1, so the newly installed 1.9 are already uninstaled.

This is output of sudo 'aptitude remove libqgis1.8.0 qgis qgis-api-doc qgis-common qgis-mapserver qgis-plugin-grass':

Code: Select all

[ ERR] Reading state information
E: Could not get lock /var/lock/aptitude - open (11: Resource temporarily unavailable)
The following packages will be REMOVED:  
  qgis qgis-api-doc qgis-common qgis-mapserver qgis-plugin-grass 
0 packages upgraded, 0 newly installed, 5 to remove and 1 not upgraded.
Need to get 0 B of archives. After unpacking 146 MB will be freed.
(Reading database ... 229275 files and directories currently installed.)
Removing qgis-plugin-grass ...
pycentral: pycentral pkgremove: package python-qgis-common is not installed
pycentral pkgremove: package python-qgis-common is not installed
dpkg: error processing qgis-plugin-grass (--remove):
 subprocess installed pre-removal script returned error exit status 1
configured to not write apport reports
                                      Removing qgis-api-doc ...
pycentral: pycentral pkgremove: package python-qgis-common is not installed
pycentral pkgremove: package python-qgis-common is not installed
dpkg: error processing qgis-api-doc (--remove):
 subprocess installed pre-removal script returned error exit status 1
configured to not write apport reports
                                      Removing qgis-mapserver ...
pycentral: pycentral pkgremove: package python-qgis-common is not installed
pycentral pkgremove: package python-qgis-common is not installed
dpkg: error processing qgis-mapserver (--remove):
 subprocess installed pre-removal script returned error exit status 1
configured to not write apport reports
                                      dpkg: qgis: dependency problems, but removing anyway as you requested:
 qgis-plugin-grass depends on qgis (= 1.8.0+git20110724+e6558be~unstable1).
Removing qgis ...
pycentral: pycentral pkgremove: package python-qgis-common is not installed
pycentral pkgremove: package python-qgis-common is not installed
dpkg: error processing qgis (--remove):
 subprocess installed pre-removal script returned error exit status 1
configured to not write apport reports
                                      dpkg: qgis-common: dependency problems, but removing anyway as you requested:
 qgis depends on qgis-common (= 1.8.0+git20110724+e6558be~unstable1); however:
  Package qgis-common is to be removed.
Removing qgis-common ...
pycentral: pycentral pkgremove: package python-qgis-common is not installed
pycentral pkgremove: package python-qgis-common is not installed
dpkg: error processing qgis-common (--remove):
 subprocess installed pre-removal script returned error exit status 1
configured to not write apport reports
                                      Errors were encountered while processing:
 qgis-plugin-grass
 qgis-api-doc
 qgis-mapserver
 qgis
 qgis-common
E: Sub-process /usr/bin/dpkg returned an error code (1)
A package failed to install.  Trying to recover:
[ ERR] Reading state information
E: Could not get lock /var/lock/aptitude - open (11: Resource temporarily unavailable)
The 'sudo apt-get -f install' returns:

Code: Select all

Reading package lists... Done
Building dependency tree       
Reading state information... Done
Correcting dependencies... Done
The following packages will be REMOVED:
  qgis qgis-mapserver qgis-plugin-grass
0 upgraded, 0 newly installed, 3 to remove and 1 not upgraded.
After this operation, 13.5 MB disk space will be freed.
Do you want to continue [Y/n]? y
Removing qgis-plugin-grass ...
pycentral: pycentral pkgremove: package python-qgis-common is not installed
pycentral pkgremove: package python-qgis-common is not installed
dpkg: error processing qgis-plugin-grass (--remove):
 subprocess installed pre-removal script returned error exit status 1
configured to not write apport reports
                                      Removing qgis-mapserver ...
pycentral: pycentral pkgremove: package python-qgis-common is not installed
pycentral pkgremove: package python-qgis-common is not installed
dpkg: error processing qgis-mapserver (--remove):
 subprocess installed pre-removal script returned error exit status 1
configured to not write apport reports
                                      dpkg: qgis: dependency problems, but removing anyway as you requested:
 qgis-plugin-grass depends on qgis (= 1.8.0+git20110724+e6558be~unstable1).
Removing qgis ...
pycentral: pycentral pkgremove: package python-qgis-common is not installed
pycentral pkgremove: package python-qgis-common is not installed
dpkg: error processing qgis (--remove):
 subprocess installed pre-removal script returned error exit status 1
configured to not write apport reports
                                      Errors were encountered while processing:
 qgis-plugin-grass
 qgis-mapserver
 qgis
E: Sub-process /usr/bin/dpkg returned an error code (1)

Have you any recommendations?
Thanks, Tomas B.
Last edited by LockBot on Wed Dec 28, 2022 7:16 am, edited 2 times in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
Tomas_IV
Level 1
Level 1
Posts: 18
Joined: Tue Jun 02, 2009 11:43 am

Re: Broken packages, please help!

Post by Tomas_IV »

In the end I have solved the problem myself. I luckily still had the qgis 1.8 package deb files on my disk in a directory. So I first installed them all again with:

Code: Select all

dpkg -i *.deb
in the directory containing the packages. This solved the broken packages. Then I removed them all with apt-get remove. Then I enabled the repository and installed the 1.9 packages. So solved.
Locked

Return to “LMDE Archive”