Libboost-pro trong linux
I'm on Ubuntu, and I want to install Boost. I tried with
But there was no such package. What is the best way to install Boost on Ubuntu?
asked Sep 25, 2012 at 7:52
0 You can use
Or you can call
find packages you need and install them using the answered Sep 25, 2012 at 7:57
Anton GuryanovAnton Guryanov 11.5k1 gold badge14 silver badges16 bronze badges 12 Get the version of Boost that you require. This is for 1.55 but feel free to change or manually download yourself:
Get the required libraries, main ones are
Boost's bootstrap setup:
Then build it with:
and eventually install it:
SAMPro 1,0441 gold badge18 silver badges38 bronze badges answered Jun 6, 2014 at 16:14
user3715812user3715812 2,4351 gold badge10 silver badges2 bronze badges 12 Installing Boost on Ubuntu with an example of using Install libboost-all-dev and aptitude:
Then paste this into a C++ file called
Compile like this:
Run it like this:
Program prints:
Gidy 4266 silver badges16 bronze badges answered May 15, 2014 at 2:36
Eric LeschinskiEric Leschinski 139k91 gold badges405 silver badges327 bronze badges 3 Get the version of Boost that you require. This is for 1.55 but feel free to change or manually download yourself (Boost download page): wget -O boost_1_55_0.tar.gz https://sourceforge.net/projects/boost/files/boost/1.55.0/boost_1_55_0.tar.gz/download tar xzvf boost_1_55_0.tar.gz cd boost_1_55_0/ Get the required libraries, main ones are icu for boost::regex support: sudo apt-get update sudo apt-get install build-essential g++ python-dev autotools-dev libicu-dev libbz2-dev Boost's bootstrap setup: ./bootstrap.sh --prefix=/usr/local If we want MPI then we need to set the flag in the user-config.jam file: user_configFile=`find $PWD -name user-config.jam` echo "using mpi ;" >> $user_configFile Find the maximum number of physical cores: n=`cat /proc/cpuinfo | grep "cpu cores" | uniq | awk '{print $NF}'` Install boost in parallel: sudo ./b2 --with=all -j $n install Assumes you have /usr/local/lib setup already. if not, you can add it to your LD LIBRARY PATH: sudo sh -c 'echo "/usr/local/lib" >> /etc/ld.so.conf.d/local.conf' Reset the ldconfig: sudo ldconfig
Coronon 3224 silver badges12 bronze badges answered Dec 21, 2016 at 22:13
6 An update for Windows 10 Ubuntu Application via Subsystem (also works on standard Ubuntu): You might have problems finding the package. If you do, never fear! PPA is here!
Then run:
answered Jun 14, 2018 at 21:49
6 You can install boost on ubuntu by using the following commands:
answered Nov 1, 2020 at 11:37
First try the following:
You may get an error message similar to the following, like I did:
Then try install below package:
Now you can create a a sample project utilizing Boost:
answered Sep 6, 2021 at 21:10
Actually you don't need "install" or "compile" anything before using Boost in your project. You can just download and extract the Boost library to any location on your machine, which is usually
like When you compile your code, you can just indicate the compiler where to find the libraries by
answered Nov 23, 2015 at 2:56
3 Install libboost-all-dev by entering the following commands in the terminal Step 1 Update package repositories and get latest package information.
Step 2 Install the packages and dependencies with -y flag .
Now that you have your libboost-all-dev installed source: https://linuxtutorial.me/ubuntu/focal/libboost-all-dev/ answered Sep 14, 2020 at 14:59
|