Instruction how to install LHAPDF6 is easy to find here: https://lhapdf.hepforge.org/install.html. But on „fresh” Linux you need to install some dependencies. This tutorial will be about installing additional dependencies needed by LHAPDF6.
Download
Download LHAPDF archive from page https://www.hepforge.org/downloads/lhapdf and unpack to any directory. Alternative method is to use wget:
wget http://www.hepforge.org/archive/lhapdf/LHAPDF-6.6.1.6.tar.gz
tar xf LHAPDF-6.1.6.tar.gz
cd LHAPDF-6.1.6
Install
Installation is standard: configure, make, make install.
I prefer to not use any special path and install this lib directly to /usr/local/lib. So I didn’t use any prefixes:
./configure
After invoking this command I got a message:
checking for Boost headers version >= 1.41.0... no
configure: error: cannot find Boost headers version >= 1.41.0
Boost was missing. Let’s install it:
sudo apt-get install libboost1.48-*
When installation process ends, checking if boost is installed:
dpkg -s libboost1.48-all-dev
How to get version of Boost:
dpkg -s libboost1.48-all-dev | grep 'Version'
In my case: Version: 1.48.0-3.
After installing Boost, retry configure LHAPDF:
./configure
Succeed. Installation:
make
sudo make install
How to check if LHAPDF is installed? Try to invoke:
ls /usr/local/lib/