Created
March 22, 2016 14:38
-
-
Save darcyliu/0629557e20ee61c19181 to your computer and use it in GitHub Desktop.
Install mlpack on CentOS 7
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Install mlpack on CentOS 7 | |
yum -y groupinstall "Development Tools" | |
yum -y install epel-release | |
yum -y install boost-devel boost-test boost-program-options boost-math libxml2-devel armadillo-devel | |
yum -y install txt2man | |
yum -y install cmake | |
wget http://www.mlpack.org/files/mlpack-2.0.1.tar.gz | |
tar xzvf mlpack-2.0.1.tar.gz | |
cd mlpack-2.0.1 | |
mkdir build | |
cd build | |
cmake ../ | |
make | |
make install | |
LD_LIBRARY_PATH=/usr/local/lib | |
export LD_LIBRARY_PATH | |
cat << EOF > demo.cpp | |
#include <mlpack/core.hpp> | |
using namespace mlpack; | |
int main(int argc, char** argv){ | |
CLI::ParseCommandLine(argc, argv); | |
Log::Debug << "Compiled with debugging symbols." << std::endl; | |
Log::Info << "Some test informational output." << std::endl; | |
Log::Warn << "A warning!" << std::endl; | |
Log::Warn << "Made it!" << std::endl; | |
} | |
EOF | |
g++ -std=c++11 -L/usr/local/lib -I/usr/local/include -lmlpack -o demo demo.cpp | |
./demo |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi @darcyliu !
I tried till lines 13
but in line number 14 (i.e cmake ../), it says "NO C++11 COMPILER AVAILABLE" even though i installed it using
wget http://people.centos.org/tru/devtools-2/devtools-2.repo -O /etc/yum.repos.d/devtools-2.repo
and
yum install devtoolset-2-gcc devtoolset-2-binutils devtoolset-2-gcc-c++
but even then it says - no c++11 compiler available.
What do I do now?