Failed to install R on Centos 7

2019-09-10 23:48发布

问题:

I have CentOS 7 (3.10.0-123.el7.x86_64) and I seem not be able to install R and then get Rstudio server working.

This is what I did:

rpm -Uvh http://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm

yum install R

Then I got this error:

Transaction check error: file /usr/lib/systemd/system/blk-availability.service from install of device-mapper-7:1.02.107-5.el7_2.1.x86_64 conflicts with file from package lvm2-7:2.02.105-14.el7.x86_64 file /usr/sbin/blkdeactivate from install of device-mapper-7:1.02.107-5.el7_2.1.x86_64 conflicts with file from package lvm2-7:2.02.105-14.el7.x86_64 file /usr/share/man/man8/blkdeactivate.8.gz from install of device-mapper-7:1.02.107-5.el7_2.1.x86_64 conflicts with file from package lvm2-7:2.02.105-14.el7.x86_64

I am not sure what it is. There is nothing from whereis R because it didn't install.

If I install Rstudio Server, it would fail to start the service and said ERROR unable to find installation of R in the system

Can someone tell me how to install R properly on Centos 7?

回答1:

That is not related to R. Your log shows a conflict between "device-mapper" and "lvm2", and these packages are used to operate with devices such as hard disks and partitions (before someone downvotes me, YES this is a crude simplification).

You should try to update your system with yum before installing R.



回答2:

I resolved this problem by updating lvm2 firstly, then install R. This idea was from: https://bugzilla.redhat.com/show_bug.cgi?id=1294128