Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

I used apt-get autoremove on my Debian server and now apt-get won't install or remove anything as it keeps trying but failing to remove libpam-ck-connector.

When trying to install anything… for example, apt-get install php5

(Reading database ... 28566 files and directories currently installed.)
Removing libpam-ck-connector:armhf ...
dpkg: error processing libpam-ck-connector:armhf (--remove):
unable to securely remove '/usr/share/doc/libpam-ck-connector/changelog.gz': Not a directory
Errors were encountered while processing:
 libpam-ck-connector:armhf
E: Sub-process /usr/bin/dpkg returned an error code (1)

I tried to run apt-get install libpam-ck-connector and got this…

libpam-ck-connector is already the newest version.
libpam-ck-connector set to manually installed.
The following NEW packages will be installed:
libck-connector0
0 upgraded, 1 newly installed, 0 to remove and 86 not upgraded.
1 not fully installed or removed.
Need to get 0 B/117 kB of archives.
After this operation, 96.3 kB of additional disk space will be used.
Selecting previously unselected package libck-connector0:armhf.
(Reading database ... 28560 files and directories currently installed.)
Unpacking libck-connector0:armhf (from .../libck-connector0_0.4.5-3.1_armhf.deb ) ...
Setting up libck-connector0:armhf (0.4.5-3.1) ...
dpkg: error processing libpam-ck-connector:armhf (--configure):
 package libpam-ck-connector:armhf is not ready for configuration
 cannot configure (current status `half-installed')
Errors were encountered while processing:
 libpam-ck-connector:armhf
E: Sub-process /usr/bin/dpkg returned an error code (1)

Any ideas on how to work around this?

share|improve this question
    
And I fixed it! Hopefully someone will find this useful down the road... I noted the path in the first error I posted... decided to remove it manually. sudo rm /usr/share/doc/libpam-ck-connector apt-get clean –  Andrew Natoli Feb 23 '13 at 3:57
add comment

1 Answer

It looks like your libpam-ck-connector package is no longer complete, probably by a manual remove of 'usr/share/doc/libpam-ck-connector/changelog.gz'.

You could try an explicit apt-get remove libpam-ck-connector or if that does not work, force a reinstall with apt-get install --reinstall libpam-ck-connector before doing the manual remove.

Removing more files/directories by hand such as in your comment might work, but could easily leave additional cruft floating around on the system.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.