[ale] How to not use ~/.local/bin as an install location?

Chris Fowler cfowler at outpostsentinel.com
Tue May 4 18:52:50 EDT 2021


If you are attempting a pure non-root install where you will not edit /etd/ld.so.conf, you'll need to use LDFLAGS.  I just ran into this installing mosquitto.

LDFLAGS="-Wl,-rpath,${HOME}/lib -L ${HOME}/lib" \
./configure ......

If you don't set an rpath, you'll eithher need ${HOME}/lib in /etc/ld.so.conf, or you'll have to run the program with a prefix of LD_LIBRARY_PATH=${HOME}/lib ....
________________________________
From: Ale <ale-bounces at ale.org> on behalf of Chris Fowler via Ale <ale at ale.org>
Sent: Monday, May 3, 2021 1:16 PM
To: Atlanta Linux Enthusiasts <ale at ale.org>
Cc: Chris Fowler <cfowler at outpostsentinel.com>
Subject: Re: [ale] How to not use ~/.local/bin as an install location?

The full prefix to ~/bin is /home/user/bin.  Test using configure this way:

./configure --prefix=${HOME}/bin \
  --sysconfdir=${HOME}/bin \
  --sbindir=${HOME}/bin \
....

You'll need to play away with it.

I use GNU Stow for ~/bin and other things.  You can do a destdir install after make
and I'll user perl-5.24.0 as an example here

mkdir target $(pwd)/perl-5.24.0-b
make DESTDIR=$(pwd)/perl-5.24.0-b install

You'll end up with perl-24.0-b/${HOME}/bin/perl ....
Use ${HOME} as Stow's target instead.
Great pkg store
mkdir ${HOME}/pkg
mv $(pwd)/targer/perl-5.24.0-b/${HOME} ${HOME}/pkg/perl-5.24.0
Now, the home dir is stripped out of the path.  Install the package
stow -t ${HOME} -d ${HOME}/pkg -S perl-5.24.0 -v -n &&
 stow -t ${HOME} -d ${HOME}/pkg -S perl-5.24.0 -v

The fist does a simulation and if it is successful the 2nd command executes.
Most packages have DESTDIR defined in their Makefile for a DESTDIR install.  Check
that file before running the command.

Using this method allows you to upgrade packages at any time and copy them to other systems.
Use '-D' to destow.  When you destow, all links created from the package in ${HOME} are gone and all that is left is the pkg in the pkg directory.



________________________________
From: Ale <ale-bounces at ale.org> on behalf of Leam Hall via Ale <ale at ale.org>
Sent: Saturday, May 1, 2021 8:44 AM
To: Atlanta Linux Enthusiasts <ale at ale.org>
Cc: Leam Hall <leamhall at gmail.com>
Subject: [ale] How to not use ~/.local/bin as an install location?

For those of us with lots of stuff in ~/bin, how do we tell install
programs not to install in ~/.local/bin?


--
Site Reliability Engineer  (reuel.net/resume)
Scribe: The Domici War     (domiciwar.net)
General Ne'er-do-well      (github.com/LeamHall)
_______________________________________________
Ale mailing list
Ale at ale.org
https://mail.ale.org/mailman/listinfo/ale
See JOBS, ANNOUNCE and SCHOOLS lists at
http://mail.ale.org/mailman/listinfo
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.ale.org/pipermail/ale/attachments/20210504/bf105ecd/attachment.htm>


More information about the Ale mailing list