我正在使用redhat centos 7,并尝试安装R:
sudo yum install R
返回:
Error: Package: R-java-devel-3.5.1-1.el7.x86_64 (epel)
Requires: java-devel
Available: 1:java-1.7.0-openjdk-devel-1.7.0.171-2.6.13.2.el7.x86_64 (centos-base-prod)
java-devel = 1:1.7.0
Available: 1:java-1.7.0-openjdk-devel-1.7.0.181-2.6.14.5.el7.x86_64 (centos-updates-prod)
java-devel = 1:1.7.0
Available: 1:java-1.7.0-openjdk-devel-1.7.0.181-2.6.14.8.el7_5.x86_64 (centos-updates-prod)
java-devel = 1:1.7.0
Available: 1:java-1.7.0-openjdk-devel-1.7.0.191-2.6.15.4.el7_5.x86_64 (centos-updates-prod)
java-devel = 1:1.7.0
Available: 1:java-1.8.0-openjdk-devel-1.8.0.161-2.b14.el7.i686 (centos-base-prod)
java-devel = 1:1.8.0
Available: 1:java-1.8.0-openjdk-devel-1.8.0.171-7.b10.el7.i686 (centos-updates-prod)
java-devel = 1:1.8.0
Available: 1:java-1.8.0-openjdk-devel-1.8.0.171-8.b10.el7_5.i686 (centos-updates-prod)
java-devel = 1:1.8.0
Available: 1:java-1.8.0-openjdk-devel-1.8.0.181-3.b13.el7_5.i686 (centos-updates-prod)
java-devel = 1:1.8.0
Error: Package: R-java-3.5.1-1.el7.x86_64 (epel)
Requires: java-headless
Available: 1:java-1.7.0-openjdk-headless-1.7.0.171-2.6.13.2.el7.x86_64 (centos-base-prod)
java-headless = 1:1.7.0
Available: 1:java-1.7.0-openjdk-headless-1.7.0.181-2.6.14.5.el7.x86_64 (centos-updates-prod)
java-headless = 1:1.7.0
Available: 1:java-1.7.0-openjdk-headless-1.7.0.181-2.6.14.8.el7_5.x86_64 (centos-updates-prod)
java-headless = 1:1.7.0
Available: 1:java-1.7.0-openjdk-headless-1.7.0.191-2.6.15.4.el7_5.x86_64 (centos-updates-prod)
java-headless = 1:1.7.0
Available: 1:java-1.8.0-openjdk-headless-1.8.0.161-2.b14.el7.i686 (centos-base-prod)
java-headless = 1:1.8.0
Available: 1:java-1.8.0-openjdk-headless-1.8.0.171-7.b10.el7.i686 (centos-updates-prod)
java-headless = 1:1.8.0
Available: 1:java-1.8.0-openjdk-headless-1.8.0.171-8.b10.el7_5.i686 (centos-updates-prod)
java-headless = 1:1.8.0
Available: 1:java-1.8.0-openjdk-headless-1.8.0.181-3.b13.el7_5.i686 (centos-updates-prod)
java-headless = 1:1.8.0
根据错误消息,我尝试安装java-devel:
sudo yum install java-devel
哪个给:
Package 1:java-1.8.0-openjdk-devel-1.8.0.181-3.b13.el7_5.x86_64 is obsoleted by 2000:gd-jdk8-1.8.0_92-fcs.x86_64 which is already installed
Nothing to do
如何安装java-devel以安装R?
[编辑]
Java版本:
java -version java version "1.8.0_92" Java(TM) SE Runtime Environment (build 1.8.0_92-b14) Java HotSpot(TM) 64-Bit Server VM (build 25.92-b14, mixed mode)
[编辑]
还尝试了以下方法:
sudo yum install R-java-devel
哪个给:
Error: Package: R-java-devel-3.5.1-1.el7.x86_64 (epel)
Requires: java-devel
Available: 1:java-1.7.0-openjdk-devel-1.7.0.171-2.6.13.2.el7.x86_64 (centos-base-prod)
java-devel = 1:1.7.0
Available: 1:java-1.7.0-openjdk-devel-1.7.0.181-2.6.14.5.el7.x86_64 (centos-updates-prod)
java-devel = 1:1.7.0
Available: 1:java-1.7.0-openjdk-devel-1.7.0.181-2.6.14.8.el7_5.x86_64 (centos-updates-prod)
java-devel = 1:1.7.0
Available: 1:java-1.7.0-openjdk-devel-1.7.0.191-2.6.15.4.el7_5.x86_64 (centos-updates-prod)
java-devel = 1:1.7.0
Available: 1:java-1.8.0-openjdk-devel-1.8.0.161-2.b14.el7.i686 (centos-base-prod)
java-devel = 1:1.8.0
Available: 1:java-1.8.0-openjdk-devel-1.8.0.171-7.b10.el7.i686 (centos-updates-prod)
java-devel = 1:1.8.0
Available: 1:java-1.8.0-openjdk-devel-1.8.0.171-8.b10.el7_5.i686 (centos-updates-prod)
java-devel = 1:1.8.0
Available: 1:java-1.8.0-openjdk-devel-1.8.0.181-3.b13.el7_5.i686 (centos-updates-prod)
java-devel = 1:1.8.0
还尝试了特定版本:
sudo yum install java-1.8.0-openjdk-devel-1.8.0.181-3.b13.el7_5.i686
返回的是: “程序包1:java-1.8.0-openjdk-devel-1.8.0.181-3.b13.el7_5.i686已被已安装的2000:gd-jdk8-1.8.0_92-fcs.x86_64淘汰。 没事”。
如何克服这些问题?标签建议也欢迎。
[编辑]
根据评论,这是yum repolist
Loaded plugins: changelog, fastestmirror, priorities, versionlock
Determining fastest mirrors
* epel: mirror.prgmr.com
centos-base-prod 9911/9911
centos-cpm-prod 125/125
centos-epel-prod 15503/15503
centos-extras-prod 402/402
centos-hips-prod 72/72
centos-itsec-prod 82/82
centos-pbis-prod 43/43
centos-puppet3-prod 242/242
centos-serverspec-prod 11/11
centos-updates-prod 1348/1348
centos_itsec_prod 82/82
collectd-enterprise 232/232
epel 12743/12743
gd-prod-centos-v6-64bit-scl 1121/1121
gd-prod-centos-v6-64bit-tms 163/163
gd-prod-centos-v7-64bit-base 9911/9911
gd-prod-centos-v7-64bit-epel 15503/15503
gd-prod-centos-v7-64bit-extras 402/402
gd-prod-centos-v7-64bit-hips 72/72
gd-prod-centos-v7-64bit-pan 83/83
gd-prod-centos-v7-64bit-sensu 2113/2113
gd-prod-centos-v7-64bit-updates 1348/1348
gdsnow 3/3
gutils 11/11
prod_centos_7_noarch_gd-snow 3/3
sensu-enterprise 4560/4560
yumrepos 87/87
repo id repo name status
!centos-base-prod/x86_64 centos-base-prod 9,910+1
!centos-cpm-prod/x86_64 centos-cpm-prod 125
!centos-epel-prod/x86_64 centos-epel-prod 15,503
!centos-extras-prod/x86_64 centos-extras-prod 402
!centos-hips-prod/x86_64 centos-hips-prod 72
!centos-itsec-prod/x86_64 centos-itsec-prod 82
!centos-pbis-prod/x86_64 centos-pbis-prod 43
!centos-puppet3-prod/x86_64 Centos Puppet prod Packages 242
!centos-sclo-rh/x86_64 CentOS-7 - SCLo rh 8,090
!centos-serverspec-prod/x86_64 centos-serverspec-prod 11
!centos-updates-prod/x86_64 centos-updates-prod 1,347+1
!centos_itsec_prod/x86_64 centos_itsec_prod 82
!collectd-enterprise/x86_64 Enterprise Collectd Packages 231+1
!epel/x86_64 Extra Packages for Enterprise Linux 7 - x86_64 12,743
!gd-prod-centos-v6-64bit-scl gd-prod-centos-v6-64bit-scl 1,121
!gd-prod-centos-v6-64bit-tms gd-prod-centos-v6-64bit-tms 163
!gd-prod-centos-v7-64bit-base gd-prod-centos-v7-64bit-base 9,910+1
!gd-prod-centos-v7-64bit-epel gd-prod-centos-v7-64bit-epel 15,503
!gd-prod-centos-v7-64bit-extras gd-prod-centos-v7-64bit-extras 402
!gd-prod-centos-v7-64bit-hips gd-prod-centos-v7-64bit-hips 72
!gd-prod-centos-v7-64bit-pan gd-prod-centos-v7-64bit-pan 82+1
!gd-prod-centos-v7-64bit-sensu gd-prod-centos-v7-64bit-sensu 2,113
!gd-prod-centos-v7-64bit-updates gd-prod-centos-v7-64bit-updates 1,347+1
!gdsnow prod_centos_7_noarch_gd-snow 3
!gutils/x86_64 GUtils Packages 11
!prod_centos_7_noarch_gd-snow prod_centos_7_noarch_gd-snow 3
!prod_centos_7_x86_64_saltstack prod_centos_7_x86_64_saltstack 76+26
!sensu-enterprise/x86_64 Enterprise Sensu Packages 4,560
!yumrepos Enterprise Yum Repos Repo 87
repolist: 84,336
[编辑]
仅根据评论yum repolist all
启用epel,base和更新存储库:
之后,我再次尝试使用sudo yum install R
这产生了:
Error: Package: libRmath-devel-3.5.0-1.el7.x86_64 (centos-epel-prod)
Requires: libRmath = 3.5.0-1.el7
Installed: libRmath-3.5.1-1.el7.x86_64 (@epel)
libRmath = 3.5.1-1.el7
Available: libRmath-3.5.0-1.el7.x86_64 (centos-epel-prod)
libRmath = 3.5.0-1.el7
Error: Package: R-java-3.5.0-1.el7.x86_64 (centos-epel-prod)
Requires: R-core = 3.5.0-1.el7
Installed: R-core-3.5.1-1.el7.x86_64 (@epel)
R-core = 3.5.1-1.el7
Available: R-core-3.5.0-1.el7.x86_64 (centos-epel-prod)
R-core = 3.5.0-1.el7
Error: Package: 1:java-1.7.0-openjdk-1.7.0.181-2.6.14.8.el7_5.x86_64 (centos-updates-prod)
Requires: java-1.7.0-openjdk-headless = 1:1.7.0.181-2.6.14.8.el7_5
Available: 1:java-1.7.0-openjdk-headless-1.7.0.171-2.6.13.2.el7.x86_64 (centos-base-prod)
java-1.7.0-openjdk-headless = 1:1.7.0.171-2.6.13.2.el7
Available: 1:java-1.7.0-openjdk-headless-1.7.0.181-2.6.14.5.el7.x86_64 (centos-updates-prod)
java-1.7.0-openjdk-headless = 1:1.7.0.181-2.6.14.5.el7
Available: 1:java-1.7.0-openjdk-headless-1.7.0.181-2.6.14.8.el7_5.x86_64 (centos-updates-prod)
java-1.7.0-openjdk-headless = 1:1.7.0.181-2.6.14.8.el7_5
Installing: 1:java-1.7.0-openjdk-headless-1.7.0.191-2.6.15.4.el7_5.x86_64 (centos-updates-prod)
java-1.7.0-openjdk-headless = 1:1.7.0.191-2.6.15.4.el7_5
Error: Package: R-java-devel-3.5.0-1.el7.x86_64 (centos-epel-prod)
Requires: java-devel
Error: Package: R-core-devel-3.5.0-1.el7.x86_64 (centos-epel-prod)
Requires: R-core = 3.5.0-1.el7
Installed: R-core-3.5.1-1.el7.x86_64 (@epel)
R-core = 3.5.1-1.el7
Available: R-core-3.5.0-1.el7.x86_64 (centos-epel-prod)
R-core = 3.5.0-1.el7
Error: Package: 1:java-1.8.0-openjdk-1.8.0.171-7.b10.el7.x86_64 (centos-updates-prod)
Requires: java-1.8.0-openjdk-headless(x86-64) = 1:1.8.0.171-7.b10.el7
Available: 1:java-1.8.0-openjdk-headless-1.8.0.161-2.b14.el7.x86_64 (centos-base-prod)
java-1.8.0-openjdk-headless(x86-64) = 1:1.8.0.161-2.b14.el7
Available: 1:java-1.8.0-openjdk-headless-1.8.0.171-7.b10.el7.i686 (centos-updates-prod)
~java-1.8.0-openjdk-headless(x86-32) = 1:1.8.0.171-7.b10.el7
Error: Package: 1:java-1.7.0-openjdk-1.7.0.181-2.6.14.5.el7.x86_64 (centos-updates-prod)
Requires: java-1.7.0-openjdk-headless = 1:1.7.0.181-2.6.14.5.el7
Available: 1:java-1.7.0-openjdk-headless-1.7.0.171-2.6.13.2.el7.x86_64 (centos-base-prod)
java-1.7.0-openjdk-headless = 1:1.7.0.171-2.6.13.2.el7
Available: 1:java-1.7.0-openjdk-headless-1.7.0.181-2.6.14.5.el7.x86_64 (centos-updates-prod)
java-1.7.0-openjdk-headless = 1:1.7.0.181-2.6.14.5.el7
Available: 1:java-1.7.0-openjdk-headless-1.7.0.181-2.6.14.8.el7_5.x86_64 (centos-updates-prod)
java-1.7.0-openjdk-headless = 1:1.7.0.181-2.6.14.8.el7_5
Installing: 1:java-1.7.0-openjdk-headless-1.7.0.191-2.6.15.4.el7_5.x86_64 (centos-updates-prod)
java-1.7.0-openjdk-headless = 1:1.7.0.191-2.6.15.4.el7_5
Error: Package: 1:java-1.8.0-openjdk-1.8.0.171-8.b10.el7_5.x86_64 (centos-updates-prod)
Requires: java-1.8.0-openjdk-headless(x86-64) = 1:1.8.0.171-8.b10.el7_5
Available: 1:java-1.8.0-openjdk-headless-1.8.0.161-2.b14.el7.x86_64 (centos-base-prod)
java-1.8.0-openjdk-headless(x86-64) = 1:1.8.0.161-2.b14.el7
Available: 1:java-1.8.0-openjdk-headless-1.8.0.171-7.b10.el7.i686 (centos-updates-prod)
~java-1.8.0-openjdk-headless(x86-32) = 1:1.8.0.171-7.b10.el7
Available: 1:java-1.8.0-openjdk-headless-1.8.0.171-8.b10.el7_5.i686 (centos-updates-prod)
~java-1.8.0-openjdk-headless(x86-32) = 1:1.8.0.171-8.b10.el7_5
Error: Package: 1:java-1.7.0-openjdk-1.7.0.171-2.6.13.2.el7.x86_64 (centos-base-prod)
Requires: java-1.7.0-openjdk-headless = 1:1.7.0.171-2.6.13.2.el7
Available: 1:java-1.7.0-openjdk-headless-1.7.0.171-2.6.13.2.el7.x86_64 (centos-base-prod)
java-1.7.0-openjdk-headless = 1:1.7.0.171-2.6.13.2.el7
Available: 1:java-1.7.0-openjdk-headless-1.7.0.181-2.6.14.5.el7.x86_64 (centos-updates-prod)
java-1.7.0-openjdk-headless = 1:1.7.0.181-2.6.14.5.el7
Available: 1:java-1.7.0-openjdk-headless-1.7.0.181-2.6.14.8.el7_5.x86_64 (centos-updates-prod)
java-1.7.0-openjdk-headless = 1:1.7.0.181-2.6.14.8.el7_5
Installing: 1:java-1.7.0-openjdk-headless-1.7.0.191-2.6.15.4.el7_5.x86_64 (centos-updates-prod)
java-1.7.0-openjdk-headless = 1:1.7.0.191-2.6.15.4.el7_5
You could try using --skip-broken to work around the problem
You could try running: rpm -Va --nofiles --nodigest
答案 0 :(得分:1)
因此看来您在可能是“奇数”位置安装了有冲突的软件包。
1:java-1.8.0-openjdk-devel-1.8.0.181-3.b13.el7_5.i686 is obsoleted by 2000:gd-jdk8-1.8.0_92-fcs.x86_64
告诉我们gd-jdk8
提供的内容与java-1.8.0-openjdk-devel
相同,但是R
不喜欢该名称,而是需要一个适当的java
,并且java-devel
包。
您需要做的第一件事就是禁用所有已启用的奇数存储库,并仅使用epel
base
和updates
存储库。
如果导航至; /etc/yum.repos.d/
,您应该找到一个充满文件的文件夹。打开它们并将enabled=1
更改为enabled=0
,这将禁用它们。
现在,您应该可以yum erase gd-jdk8
并将其与所有部门一起删除。然后,您应该可以执行yum install java-devel
,该版本应该会为您提供正确的版本。
完成操作后,您将需要降级R-core
和libRmath
软件包,就像我们的chat所显示的那样,您将设法安装{{ 1}}也想要。
做; R
对部门说“是”。那应该使您降至所需的正确版本。
最近一次做yum downgrade R-core libRmath
,幸运的是它应该为您安装!
似乎很多软件包可以由内部仓库或其他东西提供,因为您有很多前缀为“ gd”的东西,实际上并不是人们所期望的yum install R
!我想和您的运营/ IT团队谈一下发生的事情。
最后记得您禁用了所有其他存储库-好了,您可能希望立即重新启用它们...但是,如果您执行gd
,请务必确保自己知道将要执行的操作并将其替换为带有“ gd”前缀的软件包。
Yum实际上确实告诉您yum update
行出了什么问题。但是,理所当然地挖掘部门需要更多的知识,尤其是当您不确定自己在看什么时,并且不是CentOS的“现货”安装!