Jump to content

Linux install error

xXCapAwesomeXx

I keep getting this error whenever I try and upgrade/update anything and it just errors out and won't let me update. I haven't been able to update Ubuntu or Plex for a while now and I am trying to onistall some new software and have been unable to do so since it just errors out. The error I get reads 

dpkg: warning: old emacsen-common package pre-removal script subprocess returned
 error exit status 2
dpkg: trying script from the new package instead ...
chdir /var/lib/emacsen-common/state/flavor/installed: No such file or directory 
at /usr/lib/emacsen-common/lib.pl line 27.
dpkg: error processing archive /tmp/apt-dpkg-install-rtk1jX/00-emacsen-common_3.
0.4_all.deb (--unpack):
 new emacsen-common package pre-removal script subprocess returned error exit st
atus 2
chdir /var/lib/emacsen-common/state/flavor/installed: No such file or directory 
at /usr/lib/emacsen-common/lib.pl line 27, <TSORT> line 1.
dpkg: error while cleaning up:
 installed emacsen-common package post-installation script subprocess returned e
rror exit status 2

I have been unable to correct this issue and have found very little in the way of help so far.

 

Thanks in advance for any advice or suggestions.

Link to comment
Share on other sites

Link to post
Share on other sites

Which version of Ubuntu are you using? If I search for the error

Quote

chdir /var/lib/emacsen-common/state/flavor/installed: No such file or directory

I can only find bug reports that are several years old:

https://ubuntu-bugs.narkive.com/sPeqhmjF/bug-278807-re-package-cmake-2-6-0-4ubuntu2-failed-to-install-upgrade-subprocess-post-installation

https://bugs.launchpad.net/ubuntu/+source/cmake/+bug/278807

 

Seems like it is missing a directory that should be there.

Remember to either quote or @mention others, so they are notified of your reply

Link to comment
Share on other sites

Link to post
Share on other sites

7 minutes ago, Eigenvektor said:

Which version of Ubuntu are you using? If I search for the error

I can only find bug reports that are several years old:

https://ubuntu-bugs.narkive.com/sPeqhmjF/bug-278807-re-package-cmake-2-6-0-4ubuntu2-failed-to-install-upgrade-subprocess-post-installation

https://bugs.launchpad.net/ubuntu/+source/cmake/+bug/278807

 

Seems like it is missing a directory that should be there.

I am using Ubuntu 19.10

lsb_release -a

No LSB modules are available.
Distributor ID:	Ubuntu
Description:	Ubuntu 19.10
Release:	19.10
Codename:	eoan

 

Link to comment
Share on other sites

Link to post
Share on other sites

47 minutes ago, xXCapAwesomeXx said:

Thanks in advance for any advice or suggestions.

And if you uninstall emacs 1st and then try, what happens?

NOTE: I no longer frequent this site. If you really need help, PM/DM me and my e.mail will alert me. 

Link to comment
Share on other sites

Link to post
Share on other sites

55 minutes ago, Radium_Angel said:

And if you uninstall emacs 1st and then try, what happens?

Ran 

sudo apt-get remove emacs emacs23 emacs24

and it output 

Package 'emacs23' is not installed, so not removed
Package 'emacs24' is not installed, so not removed
Package 'emacs' is not installed, so not removed

The output continues with further errors

The following additional packages will be installed:
  emacsen-common
The following packages will be upgraded:
  emacsen-common
1 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
102 not fully installed or removed.
Need to get 0 B/14.9 kB of archives.
After this operation, 75.8 kB disk space will be freed.
Do you want to continue? [Y/n] Y
(Reading database ... 378171 files and directories currently installed.)
Preparing to unpack .../emacsen-common_3.0.4_all.deb ...
chdir /var/lib/emacsen-common/state/flavor/installed: No such file or directory at /usr/lib/emacsen-common/lib.pl line 27.
dpkg: warning: old emacsen-common package pre-removal script subprocess returned error exit status 2
dpkg: trying script from the new package instead ...
chdir /var/lib/emacsen-common/state/flavor/installed: No such file or directory at /usr/lib/emacsen-common/lib.pl line 27.
dpkg: error processing archive /var/cache/apt/archives/emacsen-common_3.0.4_all.deb (--unpack):
 new emacsen-common package pre-removal script subprocess returned error exit status 2
chdir /var/lib/emacsen-common/state/flavor/installed: No such file or directory at /usr/lib/emacsen-common/lib.pl line 27, <TSORT> line 1.
dpkg: error while cleaning up:
 installed emacsen-common package post-installation script subprocess returned error exit status 2
Errors were encountered while processing:
 /var/cache/apt/archives/emacsen-common_3.0.4_all.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)

 

Link to comment
Share on other sites

Link to post
Share on other sites

15 hours ago, xXCapAwesomeXx said:

and it output 

Hmmm....

It looks like something left over from a corrupted install of emacs, or a program that once needed it, and doesn't need it any more, and trying to remove it causes errors. I"m going to assume doing an uninstall of "emacsen" throws the same errors?

NOTE: I no longer frequent this site. If you really need help, PM/DM me and my e.mail will alert me. 

Link to comment
Share on other sites

Link to post
Share on other sites

1 hour ago, Radium_Angel said:

Hmmm....

It looks like something left over from a corrupted install of emacs, or a program that once needed it, and doesn't need it any more, and trying to remove it causes errors. I"m going to assume doing an uninstall of "emacsen" throws the same errors?

Yup running 

sudo apt-get remove emacsen

Outputs

Reading package lists... Done
Building dependency tree       
Reading state information... Done
Virtual packages like 'emacsen' can't be removed
The following packages were automatically installed and are no longer required:
  linux-headers-5.3.0-46 linux-headers-5.3.0-46-generic linux-headers-5.3.0-61
  linux-headers-5.3.0-61-generic linux-image-5.3.0-46-generic
  linux-image-5.3.0-61-generic linux-modules-5.3.0-46-generic
  linux-modules-5.3.0-61-generic linux-modules-extra-5.3.0-46-generic
  linux-modules-extra-5.3.0-61-generic
Use 'sudo apt autoremove' to remove them.
The following additional packages will be installed:
  emacsen-common
The following packages will be upgraded:
  emacsen-common
1 upgraded, 0 newly installed, 0 to remove and 7 not upgraded.
103 not fully installed or removed.
Need to get 0 B/14.9 kB of archives.
After this operation, 75.8 kB disk space will be freed.
Do you want to continue? [Y/n] Y
Setting up libc-bin (2.30-0ubuntu2.2) ...
(Reading database ... 378171 files and directories currently installed.)
Preparing to unpack .../emacsen-common_3.0.4_all.deb ...
chdir /var/lib/emacsen-common/state/flavor/installed: No such file or directory at /usr/lib/emacsen-common/lib.pl line 27.
dpkg: warning: old emacsen-common package pre-removal script subprocess returned error exit status 2
dpkg: trying script from the new package instead ...
chdir /var/lib/emacsen-common/state/flavor/installed: No such file or directory at /usr/lib/emacsen-common/lib.pl line 27.
dpkg: error processing archive /var/cache/apt/archives/emacsen-common_3.0.4_all.deb (--unpack):
 new emacsen-common package pre-removal script subprocess returned error exit status 2
chdir /var/lib/emacsen-common/state/flavor/installed: No such file or directory at /usr/lib/emacsen-common/lib.pl line 27, <TSORT> line 1.
dpkg: error while cleaning up:
 installed emacsen-common package post-installation script subprocess returned error exit status 2
Errors were encountered while processing:
 /var/cache/apt/archives/emacsen-common_3.0.4_all.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)

 

I was looking into it more yesterday and was thinking about trying to do an in-place update using a flash drive, do you think that would help with the corruption at all?

Link to comment
Share on other sites

Link to post
Share on other sites

1 hour ago, xXCapAwesomeXx said:

in-place update using a flash drive

I suppose it couldn't hurt, either it will work, or it'll throw the usual errors.

If it doesn't work, then I think you are at a point where it's either manually removing all traces of this errant program, or wipe and re-install.

NOTE: I no longer frequent this site. If you really need help, PM/DM me and my e.mail will alert me. 

Link to comment
Share on other sites

Link to post
Share on other sites

26 minutes ago, Radium_Angel said:

I suppose it couldn't hurt, either it will work, or it'll throw the usual errors.

If it doesn't work, then I think you are at a point where it's either manually removing all traces of this errant program, or wipe and re-install.

Oh boy...I will try the in place then and see what happens.

Link to comment
Share on other sites

Link to post
Share on other sites

  • 2 years later...
On 7/7/2020 at 12:59 PM, xXCapAwesomeXx said:

Oh boy...I will try the in place then and see what happens.

 

Hi o/

 

I had the same error when I upgraded my Ubuntu and was trying to clean packages that became trash, I was using sudo apt autoremove that time.

 

The error happens on /usr/lib/emacsen-common/lib.pl line 27

 

Preparing to unpack .../emacsen-common_3.0.4_all.deb ...
chdir /var/lib/emacsen-common/state/flavor/installed: No such file or directory at /usr/lib/emacsen-common/lib.pl line 27.
dpkg: warning: old emacsen-common package pre-removal script subprocess returned error exit status 2

image.png.4c47d55350eb3b9710eab662fb43bdd5.png

 

So, if you create this directory (empty), the script will run correctly, and the commands to install, remove and etc will work.

sudo mkdir -p /var/lib/emacsen-common/state/flavor/installed

 

Link to comment
Share on other sites

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×