how to change dpkg installation directory?

Bram Kuijper a.l.w.kuijper at
Wed Jun 17 13:34:28 UTC 2009

Hi all,

I want to change the default directory into which dpkg installs my 
applications, since I have too little space on my rootdisk. However, I 
changed the necessary configuration in /etc/dpkg/dpkg.cfg, but now 
nothing will install anymore. What should I do?

This is what I did:
In /etc/dpkg/dpkg.cfg i added the following line:
instdir /media/disk-4/bram/root

This directory is writable by root.

Then I did:
dpkg --configure -a

works perfectly.

Then I installed some program, let's do java:
sudo apt-get install openjdk-6-jre

Now I get the following error:
dpkg (subprocess): unable to execute post-installation script: No such 
file or directory
dpkg: error processing java-common (--configure)
  subprocess post-installation script returned error exit status 2

what is going on? Do I need to set more variables in dpkg.cfg in order 
to have a different installation dir working successfully?

Thanks for any hints.


More information about the ubuntu-users mailing list