Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I want to install a binary .deb package under the "/usr/local" directory rather than the default "/usr" directory but I can't because the database "/usr/local/var/lib/dpkg" doesn't exist:

$ sudo dpkg --install --instdir=/usr/local /vagrant/*.deb
Selecting previously unselected package udunits.
(Reading database ... 30137 files and directories currently installed.)
Unpacking udunits (from .../udunits-2.1.26-Linux.deb) ...
Setting up udunits (2.1.26) ...
Processing triggers for install-info ...
dpkg (subprocess): admindir must be inside instdir for dpkg to work properly
dpkg: error processing install-info (--install):
 subprocess installed post-installation script returned error exit status 2
Errors were encountered while processing:
$ sudo mkdir -p /usr/local/var/lib/dpkg
$ sudo dpkg --install --root=/usr/local /vagrant/*.debdpkg: error: failed to open package info file `/usr/local/var/lib/dpkg/status' for reading: No such file or directory

How can I change the installation-directory from "/usr" to "/usr/local"?

share|improve this question

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.