Beagle PATH (partially) recognized on Ubuntu 22.04

36 views
Skip to first unread message

alex

unread,
Jun 24, 2025, 3:35:46 AM6/24/25
to beast-users
I am running Beast 10.5.0 on Linux and after installing according to 
https://github.com/beagle-dev/beagle-lib/wiki/LinuxInstallInstructions
up to step 3, that is export LD_LIBRARY_PATH=$HOME/lib:$LD_LIBRARY_PATH

I am able to run the MCMC in the same terminal window. If I close it and open it again,
I have to do export LD_LIBRARY_PATH=$HOME/lib:$LD_LIBRARY_PATH again in order
to run it. Otherwise I get:

Creating BEAGLE DataLikelihood Delegate
Failed to load BEAGLE library: /home/alex/lib/libhmsbeagle-jni.so: libhmsbeagle.so.1: cannot open shared object file: No such file or directory
Fatal exception: No acceptable BEAGLE library plugins found. Make sure that BEAGLE is properly installed or try changing resource requirements.
java.lang.RuntimeException: No acceptable BEAGLE library plugins found. Make sure that BEAGLE is properly installed or try changing resource requirements.
at beagle.BeagleFactory.loadBeagleInstance(Unknown Source)
at dr.evomodel.treedatalikelihood.BeagleDataLikelihoodDelegate.<init>(Unknown Source)
at dr.evomodelxml.treedatalikelihood.TreeDataLikelihoodParser.createTreeDataLikelihood(Unknown Source)
at dr.evomodelxml.treedatalikelihood.TreeDataLikelihoodParser.parseXMLObject(Unknown Source)
at dr.xml.AbstractXMLObjectParser.parseXMLObject(Unknown Source)
at dr.xml.XMLParser.convert(Unknown Source)
at dr.xml.XMLParser.convert(Unknown Source)
at dr.xml.XMLParser.parse(Unknown Source)
at dr.app.beast.BeastMain.<init>(Unknown Source)
at dr.app.beast.BeastMain.main(Unknown Source)

Any idea about the cause or solution?
Thank you

Artem B

unread,
Jun 24, 2025, 10:40:30 PM6/24/25
to beast-users

That happens because you end a session by closing the terminal and all exported variables are wiped away. To keep $LD_LIBRARY_PATH for every sessions, you should add the export LD_LIBRARY_PATH=$HOME/lib:$LD_LIBRARY_PATH command into the hidden ~./bashrc file (in your HOME directory). The next command adds export LD_LIBRARY_PATH=$HOME/lib:$LD_LIBRARY_PATH to the end of bashrc:

echo 'export LD_LIBRARY_PATH=$HOME/lib:$LD_LIBRARY_PATH' >> ~/.bashrc

After that, open a new terminal that will already know $LD_LIBRARY_PATH

вторник, 24 июня 2025 г. в 15:35:46 UTC+8, alex:
Reply all
Reply to author
Forward
0 new messages