yum的配置依赖问题

2018-03-22  本文已影响17人  shuff1e

但是我从来都没安装过python2.7,那python-six.noarch 0:1.9.0-8.4是如何被安装的呢?


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/ [=<>].+//'中空格然后是[=<>]表示空格后面跟着=或者跟着<或者跟着>

上一篇下一篇

猜你喜欢

热点阅读