cannot remove ecryptfs-utils

Bug #491635 reported by jcypher
20
This bug affects 3 people
Affects Status Importance Assigned to Milestone
ecryptfs-utils (Ubuntu)
Invalid
Undecided
Unassigned

Bug Description

I cannot remove ecryptfs, which is in a broken state. Further, its state seems to prevent upgrades! Here is a transcript of the session:

# aptitude remove ecryptfs-utils libecryptfs0
Reading package lists... Done
Building dependency tree
Reading state information... Done
Reading extended state information
Initializing package states... Done
The following packages will be REMOVED:
  ecryptfs-utils samba-common{u}
0 packages upgraded, 0 newly installed, 2 to remove and 1 not upgraded.
Need to get 0B of archives. After unpacking 12.1MB will be freed.
Do you want to continue? [Y/n/?]
Writing extended state information... Done
(Reading database ... 46541 files and directories currently installed.)
Removing ecryptfs-utils ...
dpkg (subprocess): unable to execute pre-removal script: Exec format error
dpkg: error processing ecryptfs-utils (--remove):
 subprocess pre-removal script returned error exit status 2
dpkg (subprocess): unable to execute post-installation script: Exec format error
dpkg: error while cleaning up:
 subprocess post-installation script returned error exit status 2
Removing samba-common ...
update-alternatives: error or eof reading /var/lib/dpkg/alternatives/valid.dat for update_mode ()
dpkg: error processing samba-common (--remove):
 subprocess pre-removal script returned error exit status 2
<snip>

# aptitude full-upgrade
Reading package lists... Done
Building dependency tree
Reading state information... Done
Reading extended state information
Initializing package states... Done
The following packages are BROKEN:
  ecryptfs-utils
The following packages will be REMOVED:
  samba-common{u}
The following packages will be upgraded:
  tzdata
1 packages upgraded, 0 newly installed, 1 to remove and 0 not upgraded.
Need to get 0B/696kB of archives. After unpacking 11.7MB will be freed.
The following packages have unmet dependencies:
  ecryptfs-utils: Depends: libecryptfs0 (>= 48) but it is not installable
                  Depends: libgpgme11 (>= 1.1.8) but it is not installable
                  Depends: keyutils but it is not installable
                  Depends: libnss3-1d but it is not installable
The following actions will resolve these dependencies:

Remove the following packages:
ecryptfs-utils
<snip>

tags: added: exec-format-error
Revision history for this message
Brian Murray (brian-murray) wrote :

Thank you for taking the time to report this bug and helping to make Ubuntu better. This bug did not have a package associated with it, which is important for ensuring that it gets looked at by the proper developers. You can learn more about finding the right package at https://wiki.ubuntu.com/Bugs/FindRightPackage. I have classified this bug as a bug in ecryptfs-utils.

When reporting bugs in the future please use apport, either via the appropriate application's "Help -> Report a Problem" menu or using 'ubuntu-bug' and the name of the package affected. You can learn more about this functionality at https://wiki.ubuntu.com/ReportingBugs.

affects: ubuntu → ecryptfs-utils (Ubuntu)
Revision history for this message
Dave Walker (dogatemycomputer) wrote :

Thank you for taking the time to report this bug and helping to make Ubuntu better.

Could you please try to force the removal?

sudo apt-get -f purge ecryptfs-utils

Revision history for this message
jcypher (wcoile) wrote :

I tried to force it, still no love:

$ sudo apt-get -f purge ecryptfs-utils
Reading package lists... Done
Building dependency tree
Reading state information... Done
You might want to run `apt-get -f install' to correct these:
The following packages have unmet dependencies:
  samba-common: Depends: libtalloc1 but it is not going to be installed
                Depends: libwbclient0 (>= 2:3.2.0) but it is not going to be installed
E: Unmet dependencies. Try 'apt-get -f install' with no packages (or specify a solution).

...so then I tried to force removal of both ecryptfs-utils and samba-common, without success:

$ sudo apt-get -f purge ecryptfs-utils samba-common
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages will be REMOVED:
  ecryptfs-utils* samba-common*
0 upgraded, 0 newly installed, 2 to remove and 1 not upgraded.
2 not fully installed or removed.
After this operation, 12.1MB disk space will be freed.
Do you want to continue [Y/n]?
(Reading database ... 46541 files and directories currently installed.)
Removing ecryptfs-utils ...
dpkg (subprocess): unable to execute pre-removal script: Exec format error
dpkg: error processing ecryptfs-utils (--purge):
 subprocess pre-removal script returned error exit status 2
dpkg (subprocess): unable to execute post-installation script: Exec format error
dpkg: error while cleaning up:
 subprocess post-installation script returned error exit status 2
Removing samba-common ...
update-alternatives: error or eof reading /var/lib/dpkg/alternatives/valid.dat for update_mode ()
dpkg: error processing samba-common (--purge):
 subprocess pre-removal script returned error exit status 2

Revision history for this message
Dave Walker (dogatemycomputer) wrote :

Try these:

sudo aptitude update
sudo aptitude -f install
sudo dpkg --force all --remove

I suspect those command will produce the same errors but it is worth a try before we do something that could damage your system. If none of those work then you can try these steps at your own risk:

http://www.khattam.info/2009/08/04/solved-subprocess-pre-removal-script-returned-error-exit-status-2-error/

Let me know if that helps or not.

I am hesitant to mark this bug as complete because I have no way of reproducing it. It could be a hardware failure that corrupted the package or a non-standard entry in sources.list that put you in dependency hell.

Changed in ecryptfs-utils (Ubuntu):
status: New → Incomplete
Revision history for this message
jcypher (wcoile) wrote :

My sources.list is really vanilla, so you can rule that out:

$ grep -v "^#" /etc/apt/sources.list

deb http://us.archive.ubuntu.com/ubuntu/ jaunty main restricted
deb-src http://us.archive.ubuntu.com/ubuntu/ jaunty main restricted

deb http://us.archive.ubuntu.com/ubuntu/ jaunty-updates main restricted
deb-src http://us.archive.ubuntu.com/ubuntu/ jaunty-updates main restricted

deb http://us.archive.ubuntu.com/ubuntu/ jaunty universe
deb-src http://us.archive.ubuntu.com/ubuntu/ jaunty universe
deb http://us.archive.ubuntu.com/ubuntu/ jaunty-updates universe
deb-src http://us.archive.ubuntu.com/ubuntu/ jaunty-updates universe

deb http://us.archive.ubuntu.com/ubuntu/ jaunty multiverse
deb-src http://us.archive.ubuntu.com/ubuntu/ jaunty multiverse
deb http://us.archive.ubuntu.com/ubuntu/ jaunty-updates multiverse
deb-src http://us.archive.ubuntu.com/ubuntu/ jaunty-updates multiverse

deb http://security.ubuntu.com/ubuntu jaunty-security main restricted
deb-src http://security.ubuntu.com/ubuntu jaunty-security main restricted
deb http://security.ubuntu.com/ubuntu jaunty-security universe
deb-src http://security.ubuntu.com/ubuntu jaunty-security universe
deb http://security.ubuntu.com/ubuntu jaunty-security multiverse
deb-src http://security.ubuntu.com/ubuntu jaunty-security multiverse

Revision history for this message
jcypher (wcoile) wrote :

OK, I finally was able to clear the error after deleting a few errant zero-byte files:

# rm /var/lib/dpkg/alternatives/valid.dat
# rm /var/lib/dpkg/alternatives/upcase.dat
# rm /var/lib/dpkg/alternatives/lowcase.dat
# rm /var/lib/dpkg/alternatives/samba-panic-action

I don't know why these zero-byte files would cause a problem, but that seemed to do the trick.

Thanks!

Revision history for this message
Dave Walker (dogatemycomputer) wrote :

I am glad to see this issue has been resolved! I am curious what those files are used for. I may even recreate those files as zero-length files so I can reproduce the error. If I can then I will complete this bug report and send it up for investigation by a developer. If these files have the potential to cause unexpected problems with dpkg then maybe we can help save someone else the frustration of fixing it.

Revision history for this message
Dave Walker (dogatemycomputer) wrote :

jcypher:

I am still unable to recreate this problem but I am glad it is resolved. I hope you have a great day! Thank you for taking the time to report this bug and helping to make Ubuntu better.

Changed in ecryptfs-utils (Ubuntu):
status: Incomplete → Invalid
Revision history for this message
mauros (g-angeletos) wrote :

I would like this bug to be re-opened. I get the same error after installing ecryptfs-utils and I can't remove it.
I am using x64 Jaunty 9.04. Since installing the package, sometimes I can't even login after locking my screen - it just hangs.

Revision history for this message
mauros (g-angeletos) wrote :

The error message from synaptic when trying to uninstall is:

"E: ecryptfs-utils: subprocess installed pre-removal script returned error exit status 1"

Revision history for this message
mauros (g-angeletos) wrote :

Sorry - the actual version of Ubuntu is 9.10 (Karmic)

Revision history for this message
mauros (g-angeletos) wrote :

Found how to successfully uninstall the ecryptfs - see section "How to Remove an Encrypted Private Directory Setup" at

https://help.ubuntu.com/community/EncryptedPrivateDirectory#How%20to%20Remove%20an%20Encrypted%20Private%20Directory%20Setup

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Related questions

Remote bug watches

Bug watches keep track of this bug in other bug trackers.