Install conda compiler tools
Page content
Conda is quite convenient for non-root users to install softwares in Linux system. But sometimes there is no packages available in anaconda repository and we have to install these softwares from source. This post introduces the way to compile and install softwares from source, use the Kyoto Cabinet Perl module as an example.
1. Install compiler tools
According to conda document, conda packages for Linux and macOS compilers is available since Anaconda 5.0. These packages are:
-
Linux
- gcc_linux-64
- gxx_linux-64
- gfortran_linux-64
-
macOS
- clang_osx-64
- clangxx_osx-64
- gfortran_osx-64
Here we install conda gxx:
conda install -c anaconda gxx_linux-64
2. Install kyotocabinet library
Fortunately, there is already a kyotocabinet library available in conda repository.
conda install -c conda-forge kyotocabinet
3. Download kyotocabinet Perl package source
wget https://fallabs.com/kyotocabinet/perlpkg/kyotocabinet-perl-1.20.tar.gz
tar zxvf kyotocabinet-perl-1.20.tar.gz
cd kyotocabinet-perl-1.20
4. Compile and install
Install Perl through conda:
conda install -c conda-forge perl
- Note: Perl under conda takes different environment other than Perl in system (i.e., /usr/bin/perl).
perl Makefile.PL
make
make install
5. Check kyotocabinet Perl package status
perl -MKyotoCabinet -e 'print $KyotoCabinet::VERSION, "\n"'
It will output:
1.20
Now, the KyotoCabinet Perl package installed correctly.