yum install python-devel
进行到rpm_check_debug发现
python=2.7 is needed by (installed) python-six.noarch 0:1.9.0-8.4但是我的python版本是2.6,这是什么意思?
-
is needed by 说明python2.7是被需要的,说明python-six.noarch 0:1.9.0-8.4依赖于python2.7
但是我从来都没安装过python2.7,那python-six.noarch 0:1.9.0-8.4是如何被安装的呢?
可能之前强行安装过python-six.noarch 0:1.9.0-8.4,也没有管配置依赖的问题,导致现在出错
直接yum remove python-six.noarch,然后yum install python-devel就可以了
While Christian's method is fine, if it were me, I would just run "yum reinstall" on any package which is reporting missing dependencies. What you're looking at is the output of the "yum check" command, which you can run manually. "yum check" is looking at the state of the system's RPMDB and is looking for unfulfilled dependencies on installed packages, in your case, things like R-core and R-devel seem to be missing dependent packages.
This usually happens when you download an RPM file and manually force it in (e.g. "rpm -Uvh --force --nodeps R-*.x86_64.rpm"), but it has been known to happen on packages installed via yum in some corner cases.
The full output from "yum check" is useful to help differentiate those cases, but this advise is generally still good.
yum check dependencies \
| grep 'has missing requires' \
| sed 's/.\+has missing requires of //' \
| sed 's/ [=<>].\+//' \
| while read dep; do yum -y install "$dep"; done
The first line (whose output is good to inspect before running the whole thing) lists packages with broken dependencies, the second line parses out those with the "missing requires" problem, the third isolates the requires problem itself, the fourth strips version information, and the last conducts the installation. The fourth step is suboptimal, but the format in which the version requirements get reported (e.g. "mono(Mono.Cairo) = ('0', '2.0.0.0', None)" don't seem to be understandable to yum directly.
There has got to be some way yum can traverse the existing dependency tree and just pull in what's missing. If you know it, please post.
yum check dependencies \
| grep 'has missing requires' \
| sed 's/.\+has missing requires of //' \
| sed 's/ [=<>].\+//' \
| while read dep; do yum -y install "$dep"; done
sed 's/.+has missing requires of //'中.表示任意字符,+是转义+,.+表示至少一个字符
sed 's/ [=<>].+//'中空格然后是[=<>]表示空格后面跟着=或者跟着<或者跟着>