我目前正在使用Ubuntu 12.04 64位。我正在尝试按照link上的指定安装R.我成功地能够安装r-base但在尝试安装r-base-dev时遇到错误。这是错误
Reading package lists... Done
Building dependency tree
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:
The following packages have unmet dependencies:
r-base-dev : Depends: gfortran but it is not installable
Depends: libblas-dev but it is not installable or
libatlas-base-dev but it is not going to be installed
Depends: liblapack-dev but it is not installable or
libatlas-base-dev but it is not going to be installed
Depends: libreadline-dev but it is not installable
Depends: libjpeg-dev but it is not installable
Depends: libpcre3-dev but it is not installable
Depends: libpng-dev but it is not installable
Depends: libbz2-dev but it is not installable
Depends: cdbs but it is not installable
E: Unable to correct problems, you have held broken packages.
我已按照该链接中的说明添加了安全密钥,并将以下行deb http://cran.r-project.org/bin/linux/ubuntu precise/
添加到/etc/apt/sources.list
我还添加了以下ppa:sudo add-apt-repository ppa:marutter/rrutter
。
任何帮助都会很明显。
PS:我也对我在/ var / lib / apt / lists中的列表表示怀疑,所以我删除并再次创建它。仍然有同样的错误。
答案 0 :(得分:1)
我确保已启用受限制和Universe存储库(在我的情况下已禁用)。为此,按 Alt + F2 键入software-properties-gtk并按 Enter 。
在Ubuntu Software
选项卡下启用所有存储库。
之后运行
sudo apt-get update
再次运行
sudo apt-get install r-base-dev
成功完成。
我从这个link
获得了上述解决方案