DebianThis forum is for the discussion of Debian Linux.
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Introduction to Linux - A Hands on Guide
This guide was created as an overview of the Linux Operating System, geared toward new users as an exploration tour and getting started guide, with exercises at the end of each chapter.
For more advanced trainees it can be a desktop reference, and a collection of the base knowledge needed to proceed with system and network administration. This book contains many real life examples derived from the author's experience as a Linux system and network administrator, trainer and consultant. They hope these examples will help you to get a better understanding of the Linux system and that you feel encouraged to try out things on your own.
Click Here to receive this Complete Guide absolutely free.
I was wondering how I could change the default installation directory used by dpkg. The problem is that I want to install picasa but dpkg installs it in /opt and I want to have it in /usr/local/lib. I can of course manually copy the folder and create the necessary symlink but I would prefer installing with dpkg. Is there any argument I can pass to dpkg to do that?
Thanks in advance for your help,
All options can be specified both on the command line and in the
dpkg configuration file /etc/dpkg/dpkg.cfg. Each line in the
configuration file is either an option (exactly the same as the
command line option but without leading dashes) or a comment (if
it starts with a #).
--root=dir | --admindir=dir | --instdir=dir
Change default directories. admindir defaults to /var/lib/dpkg and contains many files that give informa‐
tion about status of installed or uninstalled packages,
etc. instdir defaults to / and refers to the directory
where packages are to be installed. instdir is also the
directory passed to chroot(2) before running package’s
installation scripts, which means that the scripts see
instdir as a root directory. Changing root changes inst‐
dir to dir and admindir to dir/var/lib/dpkg.
Last edited by Dutch Master; 05-08-2007 at 05:08 AM.
Thanks for your answer. I actually already tried with what is in the man page of course. However, I guess I'm not reading correctly as this does not work. Do you know how to use the --instdir option? I tried --instdir=/usr/local/lib and tell me that it cannot find the installation packages so I'm a little confused on how this option work. Well I did not have much time to try much but still I'm not sure to understand this option. Have you already used it?
well picasa comes directly from google and they apparently use occasionally other standards... you'll never have apt-get putting you a package in /opt AFAIK... but the point is that I have specific partitions for installed programs (/usr and /usr/local) and I don't have any for /opt as I don't use this directory. If it installs in /opt it ends up on my / partition which is intentionally very small as there is almost nothing in in besides /etc and such... all other stuff have their separate partition (/var /tmp /home tec...) so no I don;t want this thing ending up in /opt... I could have set it up like that from the beginning but I have been using the partition model for years and I don;t want to change it for picasa!
Anyway... Any ideas? In the worse case I'll do it manually it works fine.
Thanks for your help again :-)
However... I already tried this one... ;-)
Actually I got an idea but not sure how to proceed... the place where a given app is to be installed is specified in the control file no?... So do you think that if I extract the deb, modify the control file and then rebuild the deb it could work?... if yes do you know how to rebuild the deb from the extracted files?
Well I know it sounds a little overkill for that but I would prefer that dpkg keep track of everything on the system... :-)
yup it's actually what I though doing if I don't find any other option but doing this makes me lose the advantage of having dpkg keeping track of what is installed. But actually I would need this change of directory for just a couple of apps not in the repo because not FOSS so maybe it's ok and anyway this type of apps are not updated that often...