在Ubuntu上安装R和Rstudio的时候碰到了一些依赖项不存在的错误

The following packages have unmet dependencies:
r-base-core : Depends: libc6 (>= 2.27) but 2.23-0ubuntu10 is to be installed
Depends: libcurl4 (>= 7.28.0) but it is not installable
Depends: libicu60 (>= 60.1-1~) but it is not installable
Depends: liblapack3 but it is not going to be installed or
liblapack.so.3
Depends: libreadline7 (>= 6.0) but it is not installable
Recommends: r-recommended but it is not going to be installed
Recommends: r-base-dev but it is not going to be installed
E: Unable to correct problems, you have held broken packages.

看着像依赖项冲突

apt命令其实不能很好处理冲突的情况, 最好使用aptitude

sudo apt-get install aptitude

sudo aptitude install r-base

会提示哪些包出现来冲突

nstalled.
libicu-dev : Depends: libicu55 (= 55.1-7) but 55.1-7ubuntu0.4 is installed.
The following actions will resolve these dependencies:

Keep the following packages at their current version:
1) gfortran [Not Installed]
2) gfortran-5 [Not Installed]
3) libblas-dev [Not Installed]
4) libgfortran-5-dev [Not Installed]
5) libgfortran3 [Not Installed]
6) libicu-dev [Not Installed]
7) libjpeg-dev [Not Installed]
8) libjpeg-turbo8-dev [Not Installed]
9) libjpeg8-dev [Not Installed]
10) liblapack-dev [Not Installed]
11) liblapack3 [Not Installed]
12) libpng12-dev [Not Installed]
13) r-base [Not Installed]

,以及有哪些方案

Accept this solution? [Y/n/q/?] .
The following actions will resolve these dependencies:

Keep the following packages at their current version:
1) libjpeg-dev [Not Installed]
2) libjpeg-turbo8-dev [Not Installed]
3) libjpeg8-dev [Not Installed]
4) r-base-dev [Not Installed]

Downgrade the following packages:
5) cpp-5 [5.4.0-6ubuntu1~16.04.10 (now) -> 5.3.1-14ubuntu2 (xenial)]
6) g++-5 [5.4.0-6ubuntu1~16.04.10 (now) -> 5.3.1-14ubuntu2 (xenial)]
7) gcc-5 [5.4.0-6ubuntu1~16.04.10 (now) -> 5.3.1-14ubuntu2 (xenial)]
8) gcc-5-base [5.4.0-6ubuntu1~16.04.10 (now) -> 5.3.1-14ubuntu2 (xenial)]
9) libasan2 [5.4.0-6ubuntu1~16.04.10 (now) -> 5.3.1-14ubuntu2 (xenial)]
10) libatomic1 [5.4.0-6ubuntu1~16.04.10 (now) -> 5.3.1-14ubuntu2 (xenial)]
11) libcc1-0 [5.4.0-6ubuntu1~16.04.10 (now) -> 5.3.1-14ubuntu2 (xenial)]
12) libcilkrts5 [5.4.0-6ubuntu1~16.04.10 (now) -> 5.3.1-14ubuntu2 (xenial)]
13) libgcc-5-dev [5.4.0-6ubuntu1~16.04.10 (now) -> 5.3.1-14ubuntu2 (xenial)]
14) libgomp1 [5.4.0-6ubuntu1~16.04.10 (now) -> 5.3.1-14ubuntu2 (xenial)]
15) libicu55 [55.1-7ubuntu0.4 (now) -> 55.1-7 (xenial)]
16) libitm1 [5.4.0-6ubuntu1~16.04.10 (now) -> 5.3.1-14ubuntu2 (xenial)]
17) liblsan0 [5.4.0-6ubuntu1~16.04.10 (now) -> 5.3.1-14ubuntu2 (xenial)]
18) libmpx0 [5.4.0-6ubuntu1~16.04.10 (now) -> 5.3.1-14ubuntu2 (xenial)]
19) libpng12-0 [1.2.54-1ubuntu1.1 (now) -> 1.2.54-1ubuntu1 (xenial)]
20) libquadmath0 [5.4.0-6ubuntu1~16.04.10 (now) -> 5.3.1-14ubuntu2 (xenial)]
21) libstdc++-5-dev [5.4.0-6ubuntu1~16.04.10 (now) -> 5.3.1-14ubuntu2 (xenia
22) libstdc++6 [5.4.0-6ubuntu1~16.04.10 (now) -> 5.3.1-14ubuntu2 (xenial)]
23) libtsan0 [5.4.0-6ubuntu1~16.04.10 (now) -> 5.3.1-14ubuntu2 (xenial)]
24) libubsan0 [5.4.0-6ubuntu1~16.04.10 (now) -> 5.3.1-14ubuntu2 (xenial)]

Leave the following dependencies unresolved:
25) r-base-core recommends r-base-dev

解决冲突后即可安装成功

在shell里输入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)

Ubuntu 16.04 安装R和RStudio的更多相关文章

  1. Ubuntu 16.04 安装Mysql 5.7 踩坑小记

    title:Ubuntu 16.04 安装Mysql 5.7 踩坑小记 date: 2018.02.03 安装mysql sudo apt-get install mysql-server mysql ...

  2. ubuntu 16.04 安装 tensorflow-gpu 包括 CUDA ,CUDNN,CONDA

    ubuntu 16.04 安装 tensorflow-gpu 包括 CUDA ,CUDNN,CONDA 显卡驱动装好了,如图: 英文原文链接: https://github.com/williamFa ...

  3. Ubuntu 16.04安装sogou 拼音输入法

    一.更换为国内的软件源 安装搜狗输入法之前请先更换为国内的软件源,否则无法解决依赖问题.首先,用以下命令打开源列表: sudo gedit /etc/apt/sources.list #用文本编辑器打 ...

  4. ubuntu 16.04 安装 Matlab R2016b后启动出现的问题

    (1)报以下错误: License checkout failed.License Manager Error -95MATLAB is unable to connect to the licens ...

  5. Ubuntu 16.04安装Memcached(单机)

    Ubuntu 16.04安装Memcached,不过不仅限与Ubuntu,可以用CentOS等去安装,只不过测试时使用的是Ubuntu机器.Windows下不建议使用,本机调试可以使用,线上环境除了W ...

  6. Ubuntu 16.04 安装 Wireshark分析tcpdump的pcap包——sudo apt install wireshark-qt

    tcpdump 的抓包保存到文件的命令参数是-w xxx.cap   抓eth1的包  tcpdump -i eth1 -w /tmp/xxx.cap    抓 192.168.1.123的包  tc ...

  7. Ubuntu 16.04 安装 Kodi v17 “Krypton” Alpha 2

    Ubuntu 16.04 安装 Kodi v17 “Krypton” Alpha 2:sudo add-apt-repository ppa:team-xbmc/xbmc-nightlysudo ap ...

  8. Ubuntu 16.04安装QQ国际版图文详细教程

            因工作需要,我安装了Ubuntu 16.04,但是工作上的很多事情需要QQ联系,然而在Ubuntu上的WebQQ很是不好用,于是在网上搜索了好多个Linux版本的QQ,然而不是功能不全 ...

  9. Ubuntu 16.04安装Matlab 2016b教程

    由于代码需要依赖Linux环境,只好尝试着装MATLAB,然而各种问题接踵而至,开始了由MATLAB引发的三天Linux探寻之旅-- 下载Matlab 2016b for Linux https:// ...

随机推荐

  1. Java课程设计——人事管理系统

    主界面代码: package PersonSystem; import java.awt.*; import java.awt.event.*; import javax.swing.*; impor ...

  2. 跨平台C、C++代码注意的事项

    在我们的开发中,跨平台的需求越来越强烈,怎样保持C/C++代码能在多个平台上编译,是一个比較值得研究的问题.关于跨平台的文章网上非常多,跨平台的库网上也非常多.那么我从自己的跨平台开发经验谈一谈自己的 ...

  3. PHP数字左侧自动补零

    1.输出数字为001,002... <?php $number=0; if($number<100) { $number=$number+1; $txt=sprintf("%03 ...

  4. how to use webpart container in kentico

    https://docs.kentico.com/k11/developing-websites/developing-websites-using-the-portal-engine/using-w ...

  5. imagebutton 设置点击和按压效果

    实现 点击 时 有按压效果 更换颜色 <ImageButton android:id="@+id/mediacontroller_Fullscreen_or_not" and ...

  6. 65. ExtJs获取文本框中值的几种方式

    转自:https://blog.csdn.net/qiu512300471/article/details/17415675/ 1.Html文本框    如:<input type=" ...

  7. 在Struts2中ognl.MethodFailedExceptiond异常的解决办法

    问题描述: 在 Struts2 里面,当页面向服务器提交参数时报ognl.MethodFailedException:和java.lang.NoSuchMethodException:异常 异常信息  ...

  8. DOM对象,控制HTML元素(1)

    1:getElementsByName(name)方法 它是通过元素的name属性来查询元素,而不是通过id属性.getElementById()方法是通过元素的id属性来获取元素的. 注意: 该方法 ...

  9. codeforces——贪心

    codeforces 804A Find Amir   http://codeforces.com/problemset/problem/804/A /* 题意:给定n个学校,需要遍历所有学校,可从任 ...

  10. Linux命令(002) -- free

    一.准备知识 Linux和Windows系统在内存管理机制方面有很大的不同.在Linux中经常发现空闲内存很少,似乎所有的内存都被系统占用了,表面感觉是内存不够用了,其实不然.这是Linux内存管理的 ...