简体   繁体   中英

Install R in Linux Server

I have tried install R in Linux operated server system. I have download latest version of R from here

Then I started to install

`./configure --prefix=$HOME/R-3.4.1 --enable-R-shlib

And I get configure error: "zlib library and headers are required".

I install and configure zlib.1.2.11 and try again but still get same error.

I couldn't solve this problem.

Note - Considering your situation and provided details, I see these possible solutions :

1 - Ubtunu(Debian-based) system, Installing from package manager :

This require the user to have installation rights on your machine.

Open a terminal, and type this command.

sudo apt update
sudo apt install r-base

This will update your packages info and install R main package (r-base). As pointed out by @Touqeer you can install only the dependencies with this command.

sudo apt build-dep r-base

2 - Ubuntu(Debian-based) system, Installing from source :

If you don't have installation rights on your machine, you can proceed with source code. Thanks to the folks at AskUbuntu for this part. Dont forget to change the package version on the following code if necessary.

wget http://cran.rstudio.com/src/base/R-3/R-3.4.1.tar.gz
tar xvf R-3.4.1.tar.gz
cd R-3.4.1
./configure --prefix=$HOME/R
make && make install

This will download the required files from CRAN directly. Next it will unzip the files into a directory. After this cd command will bring you into the created directory. Finally, you will install R with the ./configure and the make && make install commands.

Always check that you are in the good working directory. If the ./configure or make && make install commands fails, you may have dependencies problems. Basicaly, you will have to do approximatively the same procedure with the missing package and so on with his dependencies. @knb at AskUbuntu propose to change the configuration file to something like configure -- with-zlib=$HOME/zlib-1.2.11 ,using the zlib dependency as example, to force a dependency path into the config file.

Keep us posted!

I tried this, and at the ./configure step, the last message was: configure: error: No F77 compiler found and then make: *** No targets specified and no makefile found. Stop.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM