Re: Install a package to alternative location

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]



This is how I have set it up:
/usr/bin = systemwide binaries
/usr/lib = systemwide libraries
~/.local/bin = user binaries
~/.local/lib = user libraries

I don't really like to use /usr/local/* on Linux, because it's not as
portable as just /usr.
I use it only in FreeBSD and OpenBSD, simply because it's the default
behavior there.

If you compile from source (includes AUR):
./configure --prefix="~/.local"
make DESTDIR="~/.local" install

If directly from the pacman repo's:
pacman -S android-ndk -r ~/.local -b /var/lib/pacman
The one downside of that is that it'll install for example
"android-tools" under ~/.local/usr/bin rather than ~/.local/bin though,
but with a bit of manual labor, you can correct that.

Then in your .bashrc or .zshrc:
export PATH=~/.local/bin:$PATH

This way you can install multiple versions of software, and binaries in
~/.local will take preference over those in /usr, and you can always
just run /usr/bin/whatever if you want to run the systemwide version
instead.

In the case of installing on a different system partition, you can
repurpose the above configuration, and just change whatever I said about
~/.local for wherever you've mounted your other partition at.

On 2023年08月17日 22:20, Jeanette C. wrote:
> Hey hey,
> my system partition is as good as full, so I wonder if there is a safe
> method to install packages to alternative locations. The packages in
> question are android-studio-system and android-ndk.
> 
> Extending the system partition is unfeasible. Yes, it is bad planning.
> 
> Best wishes,
> 
> Jeanette
> 
> -- 
>  * Website: http://juliencoder.de - for summer is a state of sound
>  * Youtube: https://www.youtube.com/channel/UCMS4rfGrTwz8W7jhC1Jnv7g
>  * Audiobombs: https://www.audiobombs.com/users/jeanette_c
>  * GitHub: https://github.com/jeanette-c
> 
> You know I'm one of a kind,
> There'll never be another me <3
> (Britney Spears)

-- 
lain.

Attachment: signature.asc
Description: PGP signature


[Index of Archives]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Share Photos]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]

  Powered by Linux