Public bug reported: Repro:
$ sudo lxc-create -t ubuntu -n precise -f /etc/lxc/local.conf -- -r precise -a i686 -b gary $ sudo lxc-start -n precise [log in as root] root@precise:~# apt-get install postgresql-common Reading package lists... Done Building dependency tree Reading state information... Done The following extra packages will be installed: openssl postgresql-client-common ssl-cert Suggested packages: ca-certificates openssl-blacklist The following NEW packages will be installed: openssl postgresql-client-common postgresql-common ssl-cert 0 upgraded, 4 newly installed, 0 to remove and 0 not upgraded. Need to get 643 kB of archives. After this operation, 1618 kB of additional disk space will be used. Do you want to continue [Y/n]? Y Get:1 http://archive.ubuntu.com/ubuntu/ precise/main openssl i386 1.0.0e-3ubuntu1 [510 kB] Get:2 http://archive.ubuntu.com/ubuntu/ precise/main postgresql-client-common all 128 [25.6 kB] Get:3 http://archive.ubuntu.com/ubuntu/ precise/main ssl-cert all 1.0.28 [12.2 kB] Get:4 http://archive.ubuntu.com/ubuntu/ precise/main postgresql-common all 128 [94.9 kB] Fetched 643 kB in 1s (482 kB/s) Preconfiguring packages ... Selecting previously unselected package openssl. (Reading database ... 12500 files and directories currently installed.) Unpacking openssl (from .../openssl_1.0.0e-3ubuntu1_i386.deb) ... Selecting previously unselected package postgresql-client-common. Unpacking postgresql-client-common (from .../postgresql-client-common_128_all.deb) ... Selecting previously unselected package ssl-cert. Unpacking ssl-cert (from .../ssl-cert_1.0.28_all.deb) ... Selecting previously unselected package postgresql-common. Unpacking postgresql-common (from .../postgresql-common_128_all.deb) ... Adding 'diversion of /usr/bin/pg_config to /usr/bin/pg_config.libpq-dev by postgresql-common' dpkg: unrecoverable fatal error, aborting: failed to fstat previous diversions file: No such file or directory E: Sub-process /usr/bin/dpkg returned an error code (2) Workaround (thanks to wgrant): sudo ln -s /etc/apparmor.d/usr.bin.lxc-start /etc/apparmor.d/disable/ sudo apparmor_parser -R /etc/apparmor.d/usr.bin.lxc-start Then it should work. Ideally we'd be able to keep apparmor involved. ** Affects: lxc (Ubuntu) Importance: Undecided Status: New -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/925024 Title: apparmor makes it impossible to install postgresql-common on Precise To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/lxc/+bug/925024/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs