首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >无法卸载和重新安装centos上的R

无法卸载和重新安装centos上的R
EN

Stack Overflow用户
提问于 2014-07-05 17:45:24
回答 1查看 4.9K关注 0票数 0

我正在试图卸载在centos的R。我试过了

代码语言:javascript
复制
sudo rpm -e R.x86_64
>error: %preun(R-2.13.0-2.el6.rf.x86_64) scriptlet failed, exit status 1

sudo yum remove R
>Failed:
  R.x86_64 0:2.13.0-2.el6.rf 

R
>R version 3.1.0 (2014-04-10) -- "Spring Dance"
Copyright (C) 2014 The R Foundation for Statistical Computing
Platform: x86_64-redhat-linux-gnu (64-bit)

R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.

当我尝试使用yum和rpm时,我无法卸载R的失败,稍后当我再次尝试R时,它运行R,如上面所示。请帮助如何卸载R在中心。

我删除了R目录,因为R执行不起作用,但R的重新安装也不起作用。我必须重新安装R才能安装一些先前不起作用的软件包,请参阅以下步骤:

代码语言:javascript
复制
$sudo rm -rf /usr/lib64/R ** deleted the R directory


$sudo rpm -ivh http://mirror.chpc.utah.edu/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm


$sudo yum  -y  –enablerepo=epel  install  R  R-devel
>Loaded plugins: fastestmirror, refresh-packagekit, security

$sudo yum  install RLoaded plugins: fastestmirror, refresh-packagekit, security
>Loading mirror speeds from cached hostfile
epel/metalink                                            | 5.3 kB     00:00     
 * base: centos.aol.in
 * epel: mirror-fpt-telecom.fpt.net
 * extras: centos.aol.in
 * rpmforge: mirror-fpt-telecom.fpt.net
 * updates: centosmirror.go4hosting.in
Cloudera-cdh4                                            |  951 B     00:00     
base                                                     | 3.7 kB     00:00     
cloudera-impala                                          |  951 B     00:00     
extras                                                   | 3.4 kB     00:00     
rpmforge                                                 | 1.9 kB     00:00     
updates                                                  | 3.4 kB     00:00     
Setting up Install Process
Package R-3.1.0-5.el6.x86_64 already installed and latest version
Nothing to do

$R
>/usr/bin/R: line 236: /usr/lib64/R/etc/ldpaths: No such file or directory

$ rpm -q --scripts R
postinstall scriptlet (using /bin/sh):
/sbin/install-info /usr/share/info/R-FAQ.info.gz /usr/share/info/dir 2>/dev/null
/sbin/install-info /usr/share/info/R-admin.info.gz /usr/share/info/dir 2>/dev/null
/sbin/install-info /usr/share/info/R-exts.info.gz /usr/share/info/dir 2>/dev/null
/sbin/install-info /usr/share/info/R-intro.info.gz /usr/share/info/dir 2>/dev/null
/sbin/install-info /usr/share/info/R-lang.info.gz /usr/share/info/dir 2>/dev/null
/sbin/ldconfig
preuninstall scriptlet (using /bin/sh):
/sbin/install-info --delete R-FAQ /usr/share/info/dir 2>/dev/null
/sbin/install-info --delete R-admin /usr/share/info/dir 2>/dev/null
/sbin/install-info --delete R-exts /usr/share/info/dir 2>/dev/null
/sbin/install-info --delete R-intro /usr/share/info/dir 2>/dev/null
/sbin/install-info --delete R-lang /usr/share/info/dir 2>/dev/null
postuninstall program: /sbin/ldconfig

$ rpm --noscripts -e R
error: "R" specifies multiple packages:
  R-2.13.0-2.el6.rf.x86_64
  R-3.1.0-5.el6.x86_64
$ R
/usr/bin/R: line 236: /usr/lib64/R/etc/ldpaths: No such file or directory

新的命令..。不确定sudo noscript -e -所有匹配R做什么?

代码语言:javascript
复制
$ sudo rpm --noscripts -e --allmatches R
$ R
/usr/bin/R: line 236: /usr/lib64/R/etc/ldpaths: No such file or directory

$ sudo yum reinstall R
Loaded plugins: fastestmirror, refresh-packagekit, security
Setting up Reinstall Process
Loading mirror speeds from cached hostfile
epel/metalink                                            | 4.7 kB     00:00     
 * base: centos.aol.in
 * epel: mirror-fpt-telecom.fpt.net
 * extras: centos.aol.in
 * rpmforge: mirror-fpt-telecom.fpt.net
 * updates: centosmirror.go4hosting.in
Cloudera-cdh4                                            |  951 B     00:00     
base                                                     | 3.7 kB     00:00     
cloudera-impala                                          |  951 B     00:00     
extras                                                   | 3.4 kB     00:00     
rpmforge                                                 | 1.9 kB     00:00     
updates                                                  | 3.4 kB     00:00     
No Match for argument: R
Package(s) R available, but not installed.
Nothing to do

$ sudo rpm --noscripts -e --allmatches R
error: package R is not installed

$ R
/usr/bin/R: line 236: /usr/lib64/R/etc/ldpaths: No such file or directory

当前产出:-

代码语言:javascript
复制
$ type -p R
/usr/bin/R

$ sudo yum install R
Loaded plugins: fastestmirror, refresh-packagekit, security
Loading mirror speeds from cached hostfile
 * base: centos.aol.in
 * epel: epel.mirror.net.in
 * extras: centos.aol.in
 * rpmforge: mirror-fpt-telecom.fpt.net
 * updates: centosmirror.go4hosting.in
Setting up Install Process
Resolving Dependencies
--> Running transaction check
---> Package R.x86_64 0:3.1.0-5.el6 will be installed
--> Finished Dependency Resolution

Dependencies Resolved

================================================================================
 Package      Arch              Version                   Repository       Size
================================================================================
Installing:
 R            x86_64            3.1.0-5.el6               epel             21 k

Transaction Summary
================================================================================
Install       1 Package(s)

Total download size: 21 k
Installed size: 0  
Is this ok [y/N]: y
Downloading Packages:
R-3.1.0-5.el6.x86_64.rpm                                 |  21 kB     00:00     
Running rpm_check_debug
Running Transaction Test
Transaction Test Succeeded
Running Transaction
Warning: RPMDB altered outside of yum.
** Found 2 pre-existing rpmdb problem(s), 'yum check' output follows:
R-devel-3.1.0-5.el6.x86_64 has missing requires of R-core-devel = ('0', '3.1.0', '5.el6')
R-java-devel-3.1.0-5.el6.x86_64 has missing requires of R-core-devel = ('0', '3.1.0', '5.el6')
  Installing : R-3.1.0-5.el6.x86_64                                         1/1 
Unable to send message to PackageKit
  Verifying  : R-3.1.0-5.el6.x86_64                                         1/1 

Installed:
  R.x86_64 0:3.1.0-5.el6                                                        

Complete!

$ R
/usr/bin/R: line 236: /usr/lib64/R/etc/ldpaths: No such file or directory

如何构建被删除的二进制文件,该文件已安装,但未生成执行R的文件

EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2014-07-06 02:23:39

rpm -q --scripts R说预运行脚本在做什么?

你可以试着让那个抄写员不失败。

或者,如果脚本没有做任何重要的事情,那么您可以运行rpm --noscripts -e R来告诉rpm不要运行package。

使用'yum重新安装R‘来重新安装R,即使这是您想要做的。(在任何情况下,您都不应该删除随机打包的文件。这没有任何帮助)。

要解决这个error: "R" specifies multiple packages问题,您可以(可能)使用rpm --noscripts -e --allmatches R

编辑:包括意见的建议,最后的解决方案似乎涉及安装(和重新安装)所有不同的R包(R,R-发展,R-核心,R-核心-发展)。

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/24589024

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档