본문 바로가기

기타(Etc.)

ubuntu에 c++ 선형대수 라이브러리 armadillo 설치

1. 설치파일 다운로드


stable 버젼 3.6.2버젼을 다운로드 받는다. 설치는 ubuntu 12.10버젼.

- 설치파일 다운로드 : http://arma.sourceforge.net/download.html




2. 설치하기


  • 다운로드 받은 파일의 압축을 푼다. 본인은 다운로드 디렉토리에 풀었다.
  • 압축을 푼 디렉토리에서 아래의 명령을 입력한다.
  • [참고] readme.txt파일을 열어보면 설치과정이 잘 설명되어 있다. 

> cd ~/다운로드/armadillo-3.6.2

> cmake .

> make

> make install


readme.txt파일 내용중 설치부분 설명.

You can use the manual installation process as described in section 3.2, or the following CMake based automatic installation.

 * Step 1:
 If CMake is not already be present on your system, download it from http://www.cmake.org
 On major Linux systems (such as Fedora, Ubuntu, Debian, etc), cmake is available as a pre-built package, though it may need to be explicitly installed (using a tool such as PackageKit, yum, rpm, apt, aptitude).

 * Step 2:
 If you have BLAS and/or LAPACK, install them before installing Armadillo. Under Mac OS X this is not necessary. 

 On Linux systems it is recommended that the following libraries are present: LAPACK, BLAS, ATLAS and Boost. LAPACK and BLAS are the most important. If you have ATLAS and Boost, it's also necessary to have the corresponding header files installed.

 * Step 3

 Open a shell (command line), change into the directory that was created by unpacking the armadillo archive, and type the following commands: 


 cmake . 

 make 


 The full stop separated from "cmake" by a space is important. CMake will figure out what other libraries are currently installed and will modify Armadillo's configuration correspondingly. CMake will also generate a run-time armadillo library, which is a combined alias for all the relevant libraries present on your system (eg. BLAS, LAPACK and ATLAS). 

 If you need to re-run cmake, it's a good idea to first delete the "CMakeCache.txt" file (not "CMakeLists.txt").

 * Step 4

 If you have access to root/administrator/superuser privileges, first enable the privileges (eg. through "su" or "sudo") and then type the following command: 


 make install 


 If you don't have root/administrator/superuser privileges, type the following command: 


 make install DESTDIR=my_usr_dir 


 where "my_usr_dir" is for storing C++ headers and library files. Make sure your C++ compiler is configured to use the sub-directories present within this directory.



'기타(Etc.)' 카테고리의 다른 글

삼성 시리즈9 NT900X4D-A68S 복구시디 구입  (3) 2013.03.11
iptime HDD3025 usb3.0 외장하드 사용기  (0) 2013.03.11
ubuntu에 LibreOffice 4.0 설치  (0) 2013.02.14
퓨젼 라면  (0) 2013.01.19
Freemind 0.9.x 버젼 사용  (0) 2013.01.13