LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Changing a package's installation location (https://www.linuxquestions.org/questions/linux-newbie-8/changing-a-packages-installation-location-4175735371/)

Jason.nix 03-27-2024 08:50 AM

Changing a package's installation location
 
Hello,
In Debian, when I want to install a package using the dpkg -i command, is it possible to change the installation location?

Thank you.

scasey 03-27-2024 06:07 PM

Accord to the man page, yes. Why would you want to do that?

Jason.nix 03-28-2024 03:42 AM

Quote:

Originally Posted by scasey (Post 6492389)
Accord to the man page, yes. Why would you want to do that?

Hello,
Thank you so much for your reply.
Like Windows operating system, you can install a program in a drive other than C drive.

evo2 03-28-2024 03:47 AM

Hi,

what are you actually trying to achieve here?
There may be a better way.

Evo2.

lvm_ 03-28-2024 04:03 AM

Typical debian package places files in multiple directories - binaries, man pages, configuration files, etc all have their predefined directories, these directories are stored in a package, which is an ar archive, and cannot be changed at installation time. All you can change is the installation root (--instdir), but this will effectively isolate the program from the rest of the system and is useful when creating separate chrooted environments. So, no.

friendlysalmon8827 04-02-2024 06:59 PM

You can achieve this goal via the use of either the whereis or which commands.

example
Code:

which nano

/usr/bin/nano

Code:


whereis ssh


whereis

ssh: /usr/bin/ssh /etc/ssh /usr/share/man/man1/ssh.1.gz



All times are GMT -5. The time now is 11:10 AM.