Cannot remove package vim, using purge or remove
When I do an upgrade, I get the following issue
$ sudo apt-get upgrade
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages will be upgraded:
libxcb-render0 libxcb-shape0 libxcb-shm0 libxcb-xv0 libxcb1
5 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
3 not fully installed or removed.
Need to get 79.8kB of archives.
After this operation, 0B of additional disk space will be used.
Do you want to continue [Y/n]? y
Get:1 http://
Get:2 http://
Get:3 http://
Get:4 http://
Get:5 http://
Fetched 79.8kB in 0s (386kB/s)
(Reading database ... 127768 files and directories currently installed.)
Preparing to replace libxcb1 1.1.93-0ubuntu3 (using .../libxcb1_
Unpacking replacement libxcb1 ...
Preparing to replace libxcb-render0 1.1.93-0ubuntu3 (using .../libxcb-
Unpacking replacement libxcb-render0 ...
Preparing to replace libxcb-shape0 1.1.93-0ubuntu3 (using .../libxcb-
Unpacking replacement libxcb-shape0 ...
Preparing to replace libxcb-shm0 1.1.93-0ubuntu3 (using .../libxcb-
Unpacking replacement libxcb-shm0 ...
Preparing to replace libxcb-xv0 1.1.93-0ubuntu3 (using .../libxcb-
Unpacking replacement libxcb-xv0 ...
Setting up vim (2:7.2.
dpkg (subprocess): unable to execute post-installation script: Exec format error
dpkg: error processing vim (--configure):
subprocess post-installation script returned error exit status 2
Setting up vim-gnome (2:7.2.
update-
dpkg: error processing vim-gnome (--configure):
subprocess post-installation script returned error exit status 2
dpkg: dependency problems prevent configuration of vim-full:
vim-full depends on vim-gnome (>= 1:7.1-135+1); however:
Package vim-gnome is not configured yet.
dpkg: error processing vim-full (--configure):
dependency problems - leaving unconfigured
Setting up libxcb1 (1.1.93-0ubuntu3.1) ...
No apport report written because the error message indicates its a followup error from a previous failure.
Setting up libxcb-render0 (1.1.93-0ubuntu3.1) ...
Setting up libxcb-shape0 (1.1.93-0ubuntu3.1) ...
Setting up libxcb-shm0 (1.1.93-0ubuntu3.1) ...
Setting up libxcb-xv0 (1.1.93-0ubuntu3.1) ...
Processing triggers for libc6 ...
ldconfig deferred processing now taking place
Errors were encountered while processing:
vim
vim-gnome
vim-full
E: Sub-process /usr/bin/dpkg returned an error code (1)
$ sudo apt-get -f purge vim
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages will be REMOVED:
vim*
0 upgraded, 0 newly installed, 1 to remove and 0 not upgraded.
3 not fully installed or removed.
After this operation, 1937kB disk space will be freed.
Do you want to continue [Y/n]? y
(Reading database ... 127767 files and directories currently installed.)
Removing vim ...
dpkg (subprocess): unable to execute pre-removal script: Exec format error
dpkg: error processing vim (--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
Errors were encountered while processing:
vim
E: Sub-process /usr/bin/dpkg returned an error code (1)
I tried this:
$ sudo dpkg --purge vim
(Reading database ... 127767 files and directories currently installed.)
Removing vim ...
dpkg (subprocess): unable to execute pre-removal script: Exec format error
dpkg: error processing vim (--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
Err
And this:
$sudo apt-get -f purge vim
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages will be REMOVED:
vim*
0 upgraded, 0 newly installed, 1 to remove and 0 not upgraded.
3 not fully installed or removed.
After this operation, 1937kB disk space will be freed.
Do you want to continue [Y/n]? y
(Reading database ... 127767 files and directories currently installed.)
Removing vim ...
dpkg (subprocess): unable to execute pre-removal script: Exec format error
dpkg: error processing vim (--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
Errors were encountered while processing:
vim
E: Sub-process /usr/bin/dpkg returned an error code (1)ors were encountered while processing:
vim
What should I try next?
Question information
- Language:
- English Edit question
- Status:
- Answered
- For:
- Ubuntu vim Edit question
- Assignee:
- No assignee Edit question
- Last query:
- Last reply:
This question was originally filed as bug #397651.
Can you help with this problem?
Provide an answer of your own, or ask surfless for more information if necessary.