add path directories for boost installation
9,406
you need the following commands:
export INCLUDE="/home/acerv3-571g/boost_1_58_0:$INCLUDE"
export LIBRARY_PATH="/home/acerv3-571g/boost_1_58_0/stage/lib:$LIBRARY_PATH"
you can execute them in a terminal to set these variables in the current terminal session. If you want to make them permanent, you have to add these lines to your .bashrc
Related videos on Youtube
Author by
Inzo Babaria
Updated on September 18, 2022Comments
-
Inzo Babaria over 1 year
I have installed boost_1.58_0 on my loptop's home directory. After some processes I faced to this message:
The following directory should be added to compiler include paths: /home/acerv3-571g/boost_1_58_0 The following directory should be added to linker library paths: /home/acerv3-571g/boost_1_58_0/stage/lib
However for other boost versions I have seen some posts but unfortunately I am not able to use of them. Regarding to my low knowledge in ubuntu, I think they are not so straightforward and clear.
The bellow lines related to the comment
# ~/.bashrc: executed by bash(1) for non-login shells. # see /usr/share/doc/bash/examples/startup-files (in the package bash-doc) # for examples # If not running interactively, don't do anything case $- in *i*) ;; *) return;; esac # don't put duplicate lines or lines starting with space in the history. # See bash(1) for more options HISTCONTROL=ignoreboth # append to the history file, don't overwrite it shopt -s histappend # for setting history length see HISTSIZE and HISTFILESIZE in bash(1) HISTSIZE=1000 HISTFILESIZE=2000 # check the window size after each command and, if necessary, # update the values of LINES and COLUMNS. shopt -s checkwinsize # If set, the pattern "**" used in a pathname expansion context will # match all files and zero or more directories and subdirectories. #shopt -s globstar
-
steeldriver over 8 yearsWhat are you actually trying to build with boost, and how (
make
?cmake
?) Fundamentally you will need to add directives like-I /home/acerv3-571g/boost_1_58_0
and-L /home/acerv3-571g/boost_1_58_0/stage/lib
on the compiler/linker command lines, however the easiest way to do that will depend somewhat on the build environment you're using. -
Inzo Babaria over 8 years@steeldriver, I had used (before I asked my question here) this line: env CPPFLAGS='-I/home/acerv3-571g/boost_1_58_0' LDFLAGS='-L/home/acerv3-571g/boost_1_58_0/stage/lib' ./configure but it did not help me
-
Inzo Babaria over 8 yearsAlso, after using of Wayne_Yux answer, I checked in terminal with
acerv3-571g@acerv3571g-Aspire-V3-571G:~$ dpkg -S /usr/include/boost/version.hpp
, But I just had gotten :dpkg-query: no path found matching pattern /usr/include/boost/version.hpp
` -
steeldriver over 8 years
dpkg
won't know anything about software that you have installed manually. IfCPPFLAGS
andLDFLAGS
dont' work, try running./configure --help
and looking for variables related specifically to the boost library such as--with-boost=
. If you need further help then tell us what you're trying to build. -
Inzo Babaria over 8 yearsI installed the boost_1_58 for building ALPS code, but the main problem happened with this message: from /home/acerv3-571g/Downloads/alps-2.2.b3-r7462-src-with-boost/boost/libs/mpi/src/broadcast.cpp:9: /home/acerv3-571g/Downloads/alps-2.2.b3-r7462-src-with-boost/boost/boost/mpi/config.hpp:20:17: fatal error: mpi.h: No such file or directory #include <mpi.h> ^ compilation terminated.
-
steeldriver over 8 yearsThat error looks like it is related to the MPI library - not the boost libraries. BTW what Ubuntu version are you using? why are you even using the
...-src-with-boost
version? I just downloaded the regular alps-2.2.b3-r7462-src.tar.gz andcmake
seems quite happy to use boost-1.54 from the Trusty repository. -
Inzo Babaria over 8 yearsThanks a bunch for following my question. Thank you very much. and exuse me for my stupid questions. Do you mean that I must use alps-2.2.b3-r7462-src.tar.gz instead of alps-2.1.1-r6176-src-with-boost.tar.gz, because I have installed boost myself? and for the command
cmake -D Boost_ROOT_DIR:PATH=/path/to/boost/directory /path/to/alps/directory
I must write:cmake -D Boost_ROOT_DIR:PATH=/home/acerv3-571g/boost_1_58 /home/acerv3-571g/Downloads/alps-2.2.b3-r7462/alps
-
steeldriver over 8 yearsAt this point, I think you would be better asking a new question such as "How do I install ALPS (Algorithms and Libraries for Physics Simulations) 2.2.b3 on Ubuntu X.Y" where X.Y is your actual release version.
-
Inzo Babaria over 8 yearsOk, I will do your advice. I should collect my question and ask that.
-
-
Inzo Babaria over 8 yearsThank so much for your guidance, I went to home directory and use of ` ls -la ~/ | more` to see hiddens, After that I used of emacs to edit the .bashrc but As I uploud that in the main question, I do not know where I should add those line in the file?!
-
Wayne_Yux over 8 yearsyou can just add them at the end of the file