User Tools

Site Tools


Sidebar

js#vista.png msort nsort

debian:apt-get-install-operation-not-permitted

apt-get install unable to create new file Operation not permitted Error

After upgrading to Mint 21 I have been getting this error quite a bit when updating packages.

ROOT
Unpacking linux-modules-5.15.0-78-generic (5.15.0-78.85) … dpkg: error processing archive /tmp/apt-dpkg-install-2L0dti/00-linux-modules-5.15.0-78-generic_5.15.0-78.85_amd64.deb (–unpack): unable to create new file '/var/lib/dpkg/info/linux-modules-5.15.0-78-generic.list-new': Operation not permitted

So far I have only been able to fix single packages as they error out on update and have not been able to find a single point of failure in the apt/dpkg world as of yet.

The biggest problem with this error is that apt/dpkg doesn't really offer an option (along the lines of “set -x”) to debug the install/upgrade process.

To keep your system running until we can figure out what is going on in this situation I have a very rough workaround. Seeing as how this is NOT a postinst script issue and a missing directory issue (don't ask. I have NO idea how this is even a thing currently) we need to go about doing the upgrade a bit differently.

Initially you will do an apt-get update and an apt-get upgrade. Shortly after you will get the above error message (pertaining to your package of headache of course) and then subsequently start cursing the devs.

What you need to do now is unpack the package and note each directory that is missing and create them by hand and when done configure the package for a complete upgrade of the package.

ROOT
mkdir -p /var/lib/dpkg/info dpkg –unpack linux-modules-5.15.0-78-generic_5.15.0-78.85_amd64.deb dpkg –configure linux-modules-5.15.0-78-generic

Now in this case there were 2 packages that didn't wish to upgrade and in the end I also had to install a third to get it all working again but in the end it was a successful upgrade.

debian/apt-get-install-operation-not-permitted.txt · Last modified: 2023/07/26 09:45 by 90.187.237.233