R source file๋ก ์ค์น in linux
TL;DR
1
2
3
4
5
6
7
8
9
10
11
wget https://cran.r-project.org/src/base/R-4/R-4.3.1.tar.gz
tar -xvzf R-4.3.1.tar.gz
cd R-4.3.1
mkdir /source/R-4.3.1
./configure --prefix=/source/R-4.3.1
make -j 10 & make install
# bashrc์ path์ค์ ์ถ๊ฐ
echo -e "PATH=/source/R-4.3.1/bin:$PATH" >> ~/.bash_profile
๊ฐ์ด ์ค์นํ๋ฉด ์ข์..
1
2
3
if (!require("BiocManager", quietly = TRUE))
install.packages("BiocManager")
BiocManager::install(version = "3.17")
Error ๋ชจ์์ง
PCRE2
๐จ configure: error: PCRE2 library and headers are required, or use --with-pcre1 and PCRE >= 8.32 with UTF-8 support
๐ก PCRE2 ์ค์นํด์ค๋ค
PCRE2 homepage
https://www.linuxfromscratch.org/blfs/view/svn/general/pcre2.html
1
2
3
4
5
6
7
8
9
10
11
12
13
wget https://github.com/PCRE2Project/pcre2/releases/download/pcre2-10.42/pcre2-10.42.tar.bz2
tar -xvf pcre2-10.42.tar.bz2
cd pcre2-10.42
mkdir /source/pcre2
./configure --prefix=/source/pcre2
make & make install
# bash_profile์ด๋ bashrc์ path ์ก์์ฃผ์ OR R ./configureํ ๋ --with-pcre2='/source/pcre2' ์ต์
์ฃผ๊ธฐ
# CFLAGS, LDFLAGS๊ฐ ์ค์ํ๋ฏ
export LD_LIBRARY_PATH=/source/pcre2/lib:$LD_LIBRARY_PATH
export CFLAGS="-I/source/pcre2/include"
export LDFLAGS="-L//source/pcre2/lib"
์ดํ ์คํจํ ๋ถ๋ถ์ผ๋ก ๋์๊ฐ์ ๋ค์์๋, R ์์ถํ์๋ ํด๋ ์ง์ฐ๊ณ ์ฒ์๋ถํฐ ๋ค์ ๋๋ฆฌ๋ ๊ฒ๋ ์ถ์ฒ
Fortran
๐จ configure: error: Maybe check LDFLAGS for paths to Fortran libraries?
๐ก gfortran ์์น ์ก์์ฃผ์
1
2
3
4
5
6
7
# gfortran ์์น ํ์ธ
which gfortran
> /hpc/packages/minerva-centos7/gcc/11.2.0/bin/gfortran # ๋ ์ด๋ฐ์์ผ๋ก ๋์ด
# LDFLAGS ์ ์์น ์ค์ ์ถ๊ฐ (์๋ณด๊ณ ๋ณธ์ธํ๊ฒฝ์ ๋ง๊ฒ ์์ ํด์ ๋ฃ๊ธฐ!)
export LDFLAGS="-L/hpc/packages/minerva-centos7/gcc/11.2.0/lib64 -L/hpc/packages/minerva-centos7/gcc/11.2.0/lib -lgfortran"
์ดํ ์คํจํ ๋ถ๋ถ์ผ๋ก ๋์๊ฐ์ ๋ค์์๋, R ์์ถํ์๋ ํด๋ ์ง์ฐ๊ณ ์ฒ์๋ถํฐ ๋ค์ ๋๋ฆฌ๋ ๊ฒ๋ ์ถ์ฒ
C compiler
์ด๊ฑด .configure
์ดํ, make
์๋ํ๋ฉด์ ์๊ธด ์๋ฌ
configure: error: cannot run C compiled programs.
gcc ๋ถ๋ช ์ ์ค์น ๋ผ์๋๋ฐ ์ ์ด๋ฐ ์๋ฌ๊ฐ ์๊ธฐ๋์ง ์ดํดํ ์ ์๊ตฌ์. gcc ๊ฒฝ๋ก ํ์ธํ๊ณ bash_profile์ ๋ฃ์ด์ค๋ค.
1
2
export PATH=/hpc/packages/minerva-centos7/gcc/11.2.0/bin:$PATH
export LD_LIBRARY_PATH=/hpc/packages/minerva-centos7/gcc/11.2.0/lib64/:$LD_LIBRARY_PATH
R ๋ค์ ์ค์นํ๋๋ฐ ๊ทธ๋๋ ์๋๋ฉด.. --host=arm
์ต์
์ ๋ฃ์ด๋ณด์.