---
# System prepended metadata

title: UBUNTU R3.4（以下）套件安裝問題
tags: [R Language, 資料科學自學園, Ubuntu]

---

# UBUNTU R3.4（以下）套件安裝問題
###### tags: `Ubuntu` `R Language` `資料科學自學園`




You find the answer in your error message:
```
------------------------ ANTICONF ERROR ---------------------------
Configuration failed because libcurl was not found. Try installing:
 * deb: libcurl4-openssl-dev (Debian, Ubuntu, etc)
....
....
```
Copy and paste the following to your Terminal and than try installing tidyverse again. Should solve the problem.
```
# Required for many packages
sudo apt-get install -y libxml2-dev libcurl4-openssl-dev libssl-dev
```

---
```
titusjob-02@titusjob02-Aspire-4920:~$ sudo apt-gel4-openssl-dev libssl-devlibcurl
[sudo] password for titusjob-02: 
正在讀取套件清單... 完成
正在重建相依關係          
正在讀取狀態資料... 完成
libcurl4-openssl-dev 已是最新版本 (7.58.0-2ubuntu3.5)。
libssl-dev 已是最新版本 (1.1.0g-2ubuntu4.3)。
libxml2-dev 已是最新版本 (2.9.4+dfsg1-6.1ubuntu1.2)。
升級 0 個，新安裝 0 個，移除 0 個，有 0 個未被升級。
```

```
titusjob-02@titusjob02-Aspire-4920:~$ R

    R version 3.4.4 (2018-03-15) -- "Someone to Lean On"
    Copyright (C) 2018 The R Foundation for Statistical Computing
    Platform: x86_64-pc-linux-gnu (64-bit)

```

https://stackoverflow.com/questions/43592316/warning-in-install-packages-installation-of-package-tidyverse-had-non-zero-e


else referecne
https://blog.zenggyu.com/en/


## another way



It seems that to get predictive results you may want to start with renaming your existing R personal library with:

`mv /home/$USER/R /home/$USER/R_old`

Also install development package of curl:

`sudo apt-get install libcurl4-openssl-dev`

And then try to install your R-package from R-terminal:
```
$ R
install.packages("forecast")
```
