Article ID: 118193, created on Oct 24, 2013, last review on May 11, 2014

  • Applies to:
  • Virtuozzo
  • Virtuozzo containers for Linux

Symptoms

It is not possible to install updates inside a Debian/Ubuntu container, the following or similar error is observed:

root@cloud5:~# aptitude -y safe-upgrade
The following partially installed packages will be configured:
   procps
No packages will be installed, upgraded, or removed.
0 packages upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
Need to get 0 B of archives. After unpacking 0 B will be used.
Setting up procps (1:3.2.8-11ubuntu6.1) ...
start: Job failed to start
invoke-rc.d: initscript procps, action "start" failed.
dpkg: error processing procps (--configure):
  subprocess installed post-installation script returned error exit status 1
No apport report written because MaxReports is reached already
                                                               Errors
were encountered while processing:
  procps
E: Sub-process /usr/bin/dpkg returned an error code (1)
A package failed to install.  Trying to recover:
Setting up procps (1:3.2.8-11ubuntu6.1) ...
start: Job failed to start
invoke-rc.d: initscript procps, action "start" failed.
dpkg: error processing procps (--configure):
  subprocess installed post-installation script returned error exit status 1
Errors were encountered while processing:
  procps

Cause

A possible cause is a sysctl setting that cannot be adjusted inside the container for some reason.

Resolution

Find out the faulty entries and comment them out in the corresponding .conf file. Real-life example:

root@ubuntu:~# cat /etc/sysctl.d/*.conf /etc/sysctl.conf | sysctl -p -
kernel.printk = 4 4 1 7
net.ipv6.conf.all.use_tempaddr = 2
net.ipv6.conf.default.use_tempaddr = 2
error: permission denied on key 'kernel.kptr_restrict'
net.ipv4.conf.default.rp_filter = 1
net.ipv4.conf.all.rp_filter = 1
net.ipv4.tcp_syncookies = 1
vm.mmap_min_addr = 65536

root@ubuntu:~# grep -l kernel.kptr_restrict /etc/sysctl.d/*.conf /etc/sysctl.conf
/etc/sysctl.d/10-kernel-hardening.conf

root@ubuntu:~# sed -i 's/kernel.kptr_restrict/#kernel.kptr_restrict/' /etc/sysctl.d/10-kernel-hardening.conf

The solution is taken from the following forum thread

Search Words

ubuntu aptitude

/usr/bin/dpkg returned an error code (1)

procps

aptitude safe-upgrade

post-installation script returned error exit status 1

d02f9caf3e11b191a38179103495106f 2897d76d56d2010f4e3a28f864d69223 e8e50b42231236b82df27684e7ec0beb 0dd5b9380c7d4884d77587f3eb0fa8ef

Email subscription for changes to this article
Save as PDF