我有与这个问题中的@Jarle Hammen Knudsen 有同样的问题,但对他们有用的解决方案不知何故对我却不起作用。我最初在那里发布了这篇文章,但它被删除了,因为它“没有回答问题”,所以我只会问另一个具有相同名称和标签的问题。如果不允许这样做,请给我发电子邮件并附上答案。
我使用 GNURoot Debian v.0.6.12_armhf 在我的三星 Galaxy S5(型号 SM-G903M,Android 5.1.1“Lollipop”)上运行 Debian 8.10,只是为了在我的手机上安装 R(部分原因是我的 PC 坏了,部分原因是它更实用)。但是,我有五个软件包被搁置了:r-base、r-base-dev、r-cran-boot、r-cran-codetools 和 r-recommended。
首先,我尝试了@Gregory Smitherman 的解决方案,一次安装一个包:
root@localhost:/# apt list --upgradable
Listing... Done
r-base/jessie-cran35 3.5.0-1~jessiecran.0 all [upgradable from: 3.3.3-1~bpo8+1]
r-base-dev/jessie-cran35 3.5.0-1~jessiecran.0 all [upgradable from: 3.3.3-1~bpo8+1]
r-cran-boot/jessie-cran35 1.3-20-1.1~jessiecran.0 all [upgradable from: 1.3-13-1]
r-cran-codetools/jessie-cran35 0.2-15-1.1~jessiecran.0 all [upgradable from: 0.2-9-1]
r-recommended/jessie-cran35 3.5.0-1~jessiecran.0 all [upgradable from: 3.3.3-1~bpo8+1]
root@localhost:/# apt-get install r-base
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 : Depends: r-base-core (>= 3.5.0-1~jessiecran.0) but 3.3.3-1~bpo8+1 is to be installed
Depends: r-recommended (= 3.5.0-1~jessiecran.0) but 3.3.3-1~bpo8+1 is to be installed
E: Unable to correct problems, you have held broken packages.
然后我尝试一次安装一个依赖项:
root@localhost:/# apt-get install r-base-core
Reading package lists... Done
Building dependency tree
Reading state information... Done
r-base-core is already the newest version.
r-base-core set to manually installed.
0 upgraded, 0 newly installed, 0 to remove and 5 not upgraded.
然后我尝试使用apt-get install -f
来一次修复一个依赖项:
root@localhost:/# apt-get install -f r-base
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 : Depends: r-base-core (>= 3.5.0-1~jessiecran.0) but 3.3.3-1~bpo8+1 is to be installed
Depends: r-recommended (= 3.5.0-1~jessiecran.0) but 3.3.3-1~bpo8+1 is to be installed
E: Unable to correct problems, you have held broken packages.
然后我一次尝试了:
root@localhost:/# apt-get install -f r-base r-base-core r-base-dev r-cran-boot r-cran-codetools r-recommended
Reading package lists... Done
Building dependency tree
Reading state information... Done
r-base-core is already the newest version.
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 : Depends: r-base-core (>= 3.5.0-1~jessiecran.0) but 3.3.3-1~bpo8+1 is to be installed
r-base-dev : Depends: r-base-core (>= 3.5.0-1~jessiecran.0) but 3.3.3-1~bpo8+1 is to be installed
r-cran-boot : Depends: r-base-core (>= 3.5.0-1~jessiecran.0) but 3.3.3-1~bpo8+1 is to be installed
Depends: r-api-3.5 but it is not installable
r-cran-codetools : Depends: r-base-core (>= 3.5.0-1~jessiecran.0) but 3.3.3-1~bpo8+1 is to be installed
Depends: r-api-3.5 but it is not installable
r-recommended : Depends: r-base-core (>= 3.5.0-1~jessiecran.0) but 3.3.3-1~bpo8+1 is to be installed
E: Unable to correct problems, you have held broken packages.
接下来,我尝试了@Dimuth Tharaka Menikgama 的第二种替代解决方案:
root@localhost:/# apt list --upgradable Listing... Done
r-base/jessie-cran35 3.5.0-1~jessiecran.0 all [upgradable from: 3.3.3-1~bpo8+1]
r-base-dev/jessie-cran35 3.5.0-1~jessiecran.0 all [upgradable from: 3.3.3-1~bpo8+1]
r-cran-boot/jessie-cran35 1.3-20-1.1~jessiecran.0 all [upgradable from: 1.3-13-1]
r-cran-codetools/jessie-cran35 0.2-15-1.1~jessiecran.0 all [upgradable from: 0.2-9-1]
r-recommended/jessie-cran35 3.5.0-1~jessiecran.0 all [upgradable from: 3.3.3-1~bpo8+1]
root@localhost:/# sudo apt-get -s dist-upgrade
Reading package lists... Done
Building dependency tree
Reading state information... Done
Calculating upgrade... Done
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
然后我尝试@GAD3R 的原始解决方案:
root@localhost:/# sudo apt-get dist-upgrade
Reading package lists... Done
Building dependency tree
Reading state information... Done
Calculating upgrade... Done
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
但问题仍然存在:
root@localhost:/# apt list --upgradable
Listing... Done
r-base/jessie-cran35 3.5.0-1~jessiecran.0 all [upgradable from: 3.3.3-1~bpo8+1]
r-base-dev/jessie-cran35 3.5.0-1~jessiecran.0 all [upgradable from: 3.3.3-1~bpo8+1]
r-cran-boot/jessie-cran35 1.3-20-1.1~jessiecran.0 all [upgradable from: 1.3-13-1]
r-cran-codetools/jessie-cran35 0.2-15-1.1~jessiecran.0 all [upgradable from: 0.2-9-1]
r-recommended/jessie-cran35 3.5.0-1~jessiecran.0 all [upgradable from: 3.3.3-1~bpo8+1]
最后,我尝试apt-get update
了apt-get upgrade
,但这次的效果比上次没有更好。
root@localhost:/# apt-get update
[censored because I don't have 10 points of reputation and these count as links]
Fetched 445 kB in 18s (23.9 kB/s)
Reading package lists... Done
root@localhost:/# apt-get upgrade
Reading package lists... Done
Building dependency tree
Reading state information... Done
Calculating upgrade... Done
The following packages have been kept back:
r-base r-base-dev r-cran-boot r-cran-codetools
r-recommended
0 upgraded, 0 newly installed, 0 to remove and 5 not upgraded.
请提供可更新/升级上述五个软件包的解决方案。
答案1
您使用的是 armhf 架构。CRAN Debian 存储库仅提供 amd64 和 i386 二进制文件。但是,某些软件包不包含特定于架构的二进制文件(例如r-base
,,r-base-dev
... r-cran-boot
)。Apt 会考虑这些。但是,Debian 的存储库只有 R 3.3.3,因此无法解析与架构无关的软件包的依赖关系。
tl;dr:坚持使用 Debian 软件包或自行构建缺失的软件包。