-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathStep-By-step instruction for install R from source.Rmd
172 lines (135 loc) · 3.62 KB
/
Step-By-step instruction for install R from source.Rmd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
#load java and gcc
```{bash}
module load java/1.8.0_60
module load gcc/4.9.3
# add the following settings to $HOME/.bashrc, then source $HOME/.bashrc
export PATH=$HOME/packages/bin:$PATH
export LD_LIBRARY_PATH=$HOME/packages/lib:$LD_LIBRARY_PATH
export CFLAGS="-I$HOME/packages/include"
export LDFLAGS="-L$HOME/packages/lib"
export CPLUS_INCLUDE_PATH="$CPLUS_INCLUDE_PATH:$HOME/packages/include"
```
# Install zlib
```{bash}
mkdir $HOME/src
mkdir $HOME/packages
cd ~/src
wget http://www.zlib.net/zlib-1.2.8.tar.gz
tar -xvzf zlib-1.2.8.tar.gz
cd zlib-1.2.8
./configure –prefix=$HOME/packages
vi Makefile:
CC= gcc -fPIC
original:CFLAGS=-I$HOME/packages/include
revised:CFLAGS=-I$HOME/packages/include -fPIC
make
make install
```
# Install bzlib
```{bash}
cd ~/src
wget http://www.bzip.org/1.0.6/bzip2-1.0.6.tar.gz
tar xzvf bzip2-1.0.6.tar.gz
cd bzip2-1.0.6
vi Makefile:
CC=gcc -fPIC
AR=ar
RANLIB=ranlib
LDFLAGS=
BIGFILES=-D_FILE_OFFSET_BITS=64
CFLAGS=-fPIC -Wall -Winline -O2 -g $(BIGFILES)
make -f Makefile-libbz2_so
make clean
make
make -n install PREFIX=$HOME/packages
```
# Install liblzma
```{bash}
cd ~/src
wget http://tukaani.org/xz/xz-5.2.2.tar.gz
tar xzvf xz-5.2.2.tar.gz
cd xz-5.2.2
./configure --prefix=$HOME/packages
make -j3
make install
```
# Install pcre
```{bash}
cd ~/src
wget ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre/pcre-8.38.tar.gz
tar xzvf pcre-8.38.tar.gz
cd pcre-8.38
./configure --enable-utf8 --prefix=$HOME/packages (UTF-8 support )
make -j3
make install
```
# Install libcurl
```{bash}
cd ~/src
wget --no-check-certificate https://curl.haxx.se/download/curl-7.47.1.tar.gz
tar xzvf curl-7.47.1.tar.gz
cd curl-7.47.1
./configure --prefix=$HOME/packages
make -j3
make install
```
# install R-devel
```{bash}
mkdir src
cd src
wget –no-check-certificate https://stat.ethz.ch/CRAN/src/base-prerelease/R-devel_2016-12-11_r71774.tar.gz
tar xzvf R-devel_2016-12-11_r71774.tar.gz
cd R-devel
./configure --prefix=$HOME/src/R-devel/ --with-cairo --with-jpeglib --with-readline --with-tcltk --with-blas --enable-BLAS-shlib --with-lapack --enable-R-profiling '--enable-R-shlib' '--enable-memory-profiling'
make
make install
```
# When You need install new package, you need specify the library:
```{r}
.libPaths()
# select path
install.packages("parallel",lib=.libPaths()[2])
```
## or
```{bash}
emacs .Renviron
```
##add
```{bash}
R_LIBS_USER=$HOME/R/lib64/R/library to .Renviron
```
## install R-3.3.1
```{bash}
wget http://cran.r-project.org/src/base/R-3/R-3.3.1.tar.gz
tar -xzf R-3.3.1.tar.gz
cd R-3.3.1
./configure --prefix=$HOME/src/R-3.3.1/ --with-cairo --with-jpeglib --with-readline --with-x --with-tcltk --with-blas --enable-BLAS-shlib --with-lapack --enable-R-profiling '--enable-R-shlib' '--enable-memory-profiling'
make
#to install R to $HOME, using the following command
make prefix=$HOME/R install
#set path for R
emacs ~/.bashrc,
add line:
export PATH=$HOME/R/bin/R:PATH
source ~/.bashrc
#check where is R
which R
```
# Install R development verwsion for windows
```{bash}
https://cran.r-project.org/bin/windows/base/rdevel.html
```
# Some Problems for using gfortran
```{bash}
#Problems:
ld: warning: directory not found for option '-L/usr/local/lib/gcc/x86_64-apple-darwin13.0.0/4.8.2'
ld: library not found for -lquadmath I had your same problem (in OS X Yosemite), and (unfortunately) painstakingly recreated
#Solution:
brew uninstall gcc
curl -O http://r.research.att.com/libs/gfortran-4.8.2-darwin13.tar.bz2
sudo tar fvxz gfortran-4.8.2-darwin13.tar.bz2 -C /
```
# To install ChipSeq, you need to do on terminal liking this:
```{bash}
export _JAVA_OPTIONS="-Xss2560k -Xmx2g"
```