2016-08-25 1 views
3

Ich habe versucht, einen CentOS-Rechner (centos7-x64-vbox43) mit VirtualBox als Provider und ansible als Provisioning-Tool "vagrantieren" . Ich ausgeführt, um den folgenden Befehl ein:"yum -y install nfs-utils nfs-utils-lib" bei der Installation von NFS-Client auf einem CentOS Landstreicher Maschine

vagrant up --provision-with ansible 

aber ich habe einen Fehler, der zur Ausführung des folgenden Befehls yum -y install nfs-utils nfs-utils-lib in der Gastmaschine verbunden ist (glaube ich):

[project-name] > vagrant up 
/opt/vagrant/embedded/gems/gems/vagrant-1.8.1/lib/vagrant/pre-rubygems.rb:31: warning: Insecure world writable dir /Applications/Qt in PATH, mode 040777 
/opt/vagrant/embedded/gems/gems/bundler-1.10.6/lib/bundler/shared_helpers.rb:78: warning: Insecure world writable dir /Applications/Qt in PATH, mode 040777 
Bringing machine 'default' up with 'virtualbox' provider... 
==> default: Clearing any previously set forwarded ports... 
==> default: Clearing any previously set network interfaces... 
==> default: Preparing network interfaces based on configuration... 
    default: Adapter 1: nat 
    default: Adapter 2: hostonly 
==> default: Forwarding ports... 
    default: 80 (guest) => 2000 (host) (adapter 1) 
    default: 22 (guest) => 2222 (host) (adapter 1) 
==> default: Running 'pre-boot' VM customizations... 
==> default: Booting VM... 
==> default: Waiting for machine to boot. This may take a few minutes... 
    default: SSH address: 127.0.0.1:2222 
    default: SSH username: vagrant 
    default: SSH auth method: private key 
    default: Warning: Remote connection disconnect. Retrying... 
==> default: Machine booted and ready! 
==> default: Checking for guest additions in VM... 
    default: The guest additions on this VM do not match the installed version of 
    default: VirtualBox! In most cases this is fine, but in rare cases it can 
    default: prevent things such as shared folders from working properly. If you see 
    default: shared folder errors, please make sure the guest additions within the 
    default: virtual machine match the version of VirtualBox you have installed on 
    default: your host and reload your VM. 
    default: 
    default: Guest Additions Version: 4.3.14 
    default: VirtualBox Version: 5.0 
==> default: Setting hostname... 
==> default: Configuring and enabling network interfaces... 
==> default: Installing NFS client... 
The following SSH command responded with a non-zero exit status. 
Vagrant assumes that this means the command failed! 

yum -y install nfs-utils nfs-utils-lib 

Stdout from the command: 

Loaded plugins: fastestmirror 
Loading mirror speeds from cached hostfile 
* base: mirror.switch.ch 
* extras: mirror.ratiokontakt.de 
* updates: mirror.ratiokontakt.de 
No package nfs-utils-lib available. 
Resolving Dependencies 
--> Running transaction check 
---> Package nfs-utils.x86_64 1:1.3.0-0.21.el7_2.1 will be installed 
--> Processing Dependency: libtirpc >= 0.2.3-1 for package: 1:nfs-utils-1.3.0-0.21.el7_2.1.x86_64 
--> Processing Dependency: gssproxy >= 0.3.0-0 for package: 1:nfs-utils-1.3.0-0.21.el7_2.1.x86_64 
--> Processing Dependency: rpcbind for package: 1:nfs-utils-1.3.0-0.21.el7_2.1.x86_64 
--> Processing Dependency: quota for package: 1:nfs-utils-1.3.0-0.21.el7_2.1.x86_64 
--> Processing Dependency: libnfsidmap for package: 1:nfs-utils-1.3.0-0.21.el7_2.1.x86_64 
--> Processing Dependency: libevent for package: 1:nfs-utils-1.3.0-0.21.el7_2.1.x86_64 
--> Processing Dependency: libdevmapper.so.1.02(DM_1_02_97)(64bit) for package: 1:nfs-utils-1.3.0-0.21.el7_2.1.x86_64 
--> Processing Dependency: keyutils for package: 1:nfs-utils-1.3.0-0.21.el7_2.1.x86_64 
--> Processing Dependency: libtirpc.so.1()(64bit) for package: 1:nfs-utils-1.3.0-0.21.el7_2.1.x86_64 
--> Processing Dependency: libnfsidmap.so.0()(64bit) for package: 1:nfs-utils-1.3.0-0.21.el7_2.1.x86_64 
--> Processing Dependency: libevent-2.0.so.5()(64bit) for package: 1:nfs-utils-1.3.0-0.21.el7_2.1.x86_64 
--> Running transaction check 
---> Package device-mapper-libs.x86_64 7:1.02.84-14.el7 will be updated 
--> Processing Dependency: device-mapper-libs = 7:1.02.84-14.el7 for package: 7:device-mapper-1.02.84-14.el7.x86_64 
---> Package device-mapper-libs.x86_64 7:1.02.107-5.el7_2.5 will be an update 
---> Package gssproxy.x86_64 0:0.4.1-7.el7 will be installed 
--> Processing Dependency: krb5-libs >= 1.12.0 for package: gssproxy-0.4.1-7.el7.x86_64 
--> Processing Dependency: libverto-tevent for package: gssproxy-0.4.1-7.el7.x86_64 
--> Processing Dependency: libini_config.so.3(INI_CONFIG_1.1.0)(64bit) for package: gssproxy-0.4.1-7.el7.x86_64 
--> Processing Dependency: libref_array.so.1()(64bit) for package: gssproxy-0.4.1-7.el7.x86_64 
--> Processing Dependency: libini_config.so.3()(64bit) for package: gssproxy-0.4.1-7.el7.x86_64 
--> Processing Dependency: libcollection.so.2()(64bit) for package: gssproxy-0.4.1-7.el7.x86_64 
--> Processing Dependency: libbasicobjects.so.0()(64bit) for package: gssproxy-0.4.1-7.el7.x86_64 
---> Package keyutils.x86_64 0:1.5.8-3.el7 will be installed 
---> Package libevent.x86_64 0:2.0.21-4.el7 will be installed 
---> Package libnfsidmap.x86_64 0:0.25-12.el7 will be installed 
---> Package libtirpc.x86_64 0:0.2.4-0.6.el7 will be installed 
---> Package quota.x86_64 1:4.01-11.el7_2.1 will be installed 
--> Processing Dependency: quota-nls = 1:4.01-11.el7_2.1 for package: 1:quota-4.01-11.el7_2.1.x86_64 
--> Processing Dependency: tcp_wrappers for package: 1:quota-4.01-11.el7_2.1.x86_64 
---> Package rpcbind.x86_64 0:0.2.0-33.el7_2.1 will be installed 
--> Processing Dependency: libsystemd.so.0(LIBSYSTEMD_209)(64bit) for package: rpcbind-0.2.0-33.el7_2.1.x86_64 
--> Processing Dependency: libsystemd.so.0()(64bit) for package: rpcbind-0.2.0-33.el7_2.1.x86_64 
--> Running transaction check 
---> Package device-mapper.x86_64 7:1.02.84-14.el7 will be updated 
--> Processing Dependency: device-mapper = 7:1.02.84-14.el7 for package: 7:device-mapper-event-1.02.84-14.el7.x86_64 
---> Package device-mapper.x86_64 7:1.02.107-5.el7_2.5 will be an update 
---> Package krb5-libs.x86_64 0:1.11.3-49.el7 will be updated 
---> Package krb5-libs.x86_64 0:1.13.2-12.el7_2 will be an update 
---> Package libbasicobjects.x86_64 0:0.1.1-25.el7 will be installed 
---> Package libcollection.x86_64 0:0.6.2-25.el7 will be installed 
---> Package libini_config.x86_64 0:1.2.0-25.el7 will be installed 
--> Processing Dependency: libpath_utils.so.1(PATH_UTILS_0.2.1)(64bit) for package: libini_config-1.2.0-25.el7.x86_64 
--> Processing Dependency: libpath_utils.so.1()(64bit) for package: libini_config-1.2.0-25.el7.x86_64 
---> Package libref_array.x86_64 0:0.1.5-25.el7 will be installed 
---> Package libverto-tevent.x86_64 0:0.2.5-4.el7 will be installed 
--> Processing Dependency: libtevent.so.0(TEVENT_0.9.9)(64bit) for package: libverto-tevent-0.2.5-4.el7.x86_64 
--> Processing Dependency: libtalloc.so.2(TALLOC_2.0.2)(64bit) for package: libverto-tevent-0.2.5-4.el7.x86_64 
--> Processing Dependency: libtevent.so.0()(64bit) for package: libverto-tevent-0.2.5-4.el7.x86_64 
--> Processing Dependency: libtalloc.so.2()(64bit) for package: libverto-tevent-0.2.5-4.el7.x86_64 
---> Package quota-nls.noarch 1:4.01-11.el7_2.1 will be installed 
---> Package systemd-libs.x86_64 0:208-11.el7_0.2 will be updated 
--> Processing Dependency: systemd-libs = 208-11.el7_0.2 for package: systemd-208-11.el7_0.2.x86_64 
---> Package systemd-libs.x86_64 0:219-19.el7_2.11 will be an update 
---> Package tcp_wrappers.x86_64 0:7.6-77.el7 will be installed 
--> Running transaction check 
---> Package device-mapper-event.x86_64 7:1.02.84-14.el7 will be updated 
---> Package device-mapper-event.x86_64 7:1.02.107-5.el7_2.5 will be an update 
--> Processing Dependency: device-mapper-event-libs = 7:1.02.107-5.el7_2.5 for package: 7:device-mapper-event-1.02.107-5.el7_2.5.x86_64 
---> Package libpath_utils.x86_64 0:0.2.1-25.el7 will be installed 
---> Package libtalloc.x86_64 0:2.1.5-1.el7_2 will be installed 
---> Package libtevent.x86_64 0:0.9.26-1.el7_2.1 will be installed 
---> Package systemd.x86_64 0:208-11.el7_0.2 will be updated 
--> Processing Dependency: systemd = 208-11.el7_0.2 for package: systemd-sysv-208-11.el7_0.2.x86_64 
--> Processing Dependency: systemd = 208-11.el7_0.2 for package: libgudev1-208-11.el7_0.2.x86_64 
---> Package systemd.x86_64 0:219-19.el7_2.11 will be an update 
--> Processing Dependency: kmod >= 18-4 for package: systemd-219-19.el7_2.11.x86_64 
--> Running transaction check 
---> Package device-mapper-event-libs.x86_64 7:1.02.84-14.el7 will be updated 
---> Package device-mapper-event-libs.x86_64 7:1.02.107-5.el7_2.5 will be an update 
---> Package kmod.x86_64 0:14-9.el7 will be updated 
---> Package kmod.x86_64 0:20-5.el7 will be an update 
---> Package libgudev1.x86_64 0:208-11.el7_0.2 will be updated 
---> Package libgudev1.x86_64 0:219-19.el7_2.11 will be an update 
---> Package systemd-sysv.x86_64 0:208-11.el7_0.2 will be updated 
---> Package systemd-sysv.x86_64 0:219-19.el7_2.11 will be an update 
--> Processing Conflict: systemd-219-19.el7_2.11.x86_64 conflicts initscripts < 9.49.28-1 
--> Restarting Dependency Resolution with new changes. 
--> Running transaction check 
---> Package initscripts.x86_64 0:9.49.17-1.el7 will be updated 
---> Package initscripts.x86_64 0:9.49.30-1.el7_2.2 will be an update 
--> Processing Conflict: systemd-219-19.el7_2.11.x86_64 conflicts dracut < 033-243 
--> Restarting Dependency Resolution with new changes. 
--> Running transaction check 
---> Package dracut.x86_64 0:033-161.el7 will be updated 
--> Processing Dependency: dracut = 033-161.el7 for package: dracut-config-rescue-033-161.el7.x86_64 
--> Processing Dependency: dracut = 033-161.el7 for package: dracut-network-033-161.el7.x86_64 
---> Package dracut.x86_64 0:033-360.el7_2.1 will be an update 
--> Running transaction check 
---> Package dracut-config-rescue.x86_64 0:033-161.el7 will be updated 
---> Package dracut-config-rescue.x86_64 0:033-360.el7_2.1 will be an update 
---> Package dracut-network.x86_64 0:033-161.el7 will be updated 
---> Package dracut-network.x86_64 0:033-360.el7_2.1 will be an update 
--> Finished Dependency Resolution 

Dependencies Resolved 

================================================================================ 
Package      Arch  Version     Repository Size 
================================================================================ 
Installing: 
nfs-utils     x86_64 1:1.3.0-0.21.el7_2.1 updates 371 k 
Updating: 
dracut      x86_64 033-360.el7_2.1   updates 311 k 
initscripts     x86_64 9.49.30-1.el7_2.2  updates 429 k 
Installing for dependencies: 
gssproxy     x86_64 0.4.1-7.el7    base  84 k 
keyutils     x86_64 1.5.8-3.el7    base  54 k 
libbasicobjects    x86_64 0.1.1-25.el7   base  24 k 
libcollection    x86_64 0.6.2-25.el7   base  40 k 
libevent     x86_64 2.0.21-4.el7   base  214 k 
libini_config    x86_64 1.2.0-25.el7   base  59 k 
libnfsidmap     x86_64 0.25-12.el7    base  46 k 
libpath_utils    x86_64 0.2.1-25.el7   base  27 k 
libref_array    x86_64 0.1.5-25.el7   base  26 k 
libtalloc     x86_64 2.1.5-1.el7_2   updates  34 k 
libtevent     x86_64 0.9.26-1.el7_2.1  updates  33 k 
libtirpc     x86_64 0.2.4-0.6.el7   base  85 k 
libverto-tevent    x86_64 0.2.5-4.el7    base  9.0 k 
quota      x86_64 1:4.01-11.el7_2.1  updates 178 k 
quota-nls     noarch 1:4.01-11.el7_2.1  updates  90 k 
rpcbind      x86_64 0.2.0-33.el7_2.1  updates  58 k 
tcp_wrappers    x86_64 7.6-77.el7    base  78 k 
Updating for dependencies: 
device-mapper    x86_64 7:1.02.107-5.el7_2.5 updates 252 k 
device-mapper-event   x86_64 7:1.02.107-5.el7_2.5 updates 167 k 
device-mapper-event-libs x86_64 7:1.02.107-5.el7_2.5 updates 169 k 
device-mapper-libs   x86_64 7:1.02.107-5.el7_2.5 updates 305 k 
dracut-config-rescue  x86_64 033-360.el7_2.1   updates  50 k 
dracut-network    x86_64 033-360.el7_2.1   updates  90 k 
kmod      x86_64 20-5.el7    base  114 k 
krb5-libs     x86_64 1.13.2-12.el7_2   updates 843 k 
libgudev1     x86_64 219-19.el7_2.11   updates  66 k 
systemd      x86_64 219-19.el7_2.11   updates 5.1 M 
systemd-libs    x86_64 219-19.el7_2.11   updates 358 k 
systemd-sysv    x86_64 219-19.el7_2.11   updates  53 k 

Transaction Summary 
================================================================================ 
Install 1 Package (+17 Dependent packages) 
Upgrade 2 Packages (+12 Dependent packages) 

Total size: 9.8 M 
Downloading packages: 
Running transaction check 
Running transaction test 


Stderr from the command: 



Transaction check error: 
    file /usr/lib/systemd/system/blk-availability.service from install of device-mapper-7:1.02.107-5.el7_2.5.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.5.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.5.x86_64 conflicts with file from package lvm2-7:2.02.105-14.el7.x86_64 

Error Summary 
------------- 

I Ich habe keine Ahnung, warum das passiert, da ich vagrant nicht sehr gut kenne, sagen wir, dass ich es zweimal oder dreimal benutzt habe. Meine erste Frage lautet dann: Warum passiert das genau?

Hinweis Ich denke, ich weiß, was NFS ist, d. H. Es sollte ein Dateisystem auf dem Gastcomputer sein, das es dem gleichen Computer und dem Hostcomputer ermöglicht, Ordner und Dateien gemeinsam zu nutzen, richtig?


Ich war nicht in der Lage, dieses Problem zu lösen, bis ich den folgenden Artikel gefunden:

oben

yum update or yum install fails with package conflict between 64 bit and 32 bit package architectures?

dessen Titel scheint zu sein, zumindest für mich, völlig unabhängig von dem Problem.

Ich erkannte, dass nach dem Fehlschlag des obigen Befehls, die Vagrant-Maschine tatsächlich initialisiert worden war, und dass ich mit ihm unter Verwendung vagrant ssh verbinden konnte, was ich tat. Dann aus dem Gast vagrant Maschine (nach vagrant ssh), ausgeführt ich die folgenden Befehle ein (die die gleichen Befehle, die in dem Artikel angegeben wurden die ich gerade erwähnt habe):

sudo yum install yum-utils 
sudo package-cleanup --dupes 
sudo package-cleanup --cleandupes 

Added diese Zeile:

exactarch=1 

in die Datei /etc/yum.conf und schließlich

yum clean all 
sudo yum update 

ich aus dem vagran verlassen t Maschine durch Eingabe von 10. Ich habe vagrant halt, um die Maschine zu stoppen. Und ich führte den ursprünglichen Befehl erneut aus:

und der Fehler trat nicht mehr auf.

Meine zweite Frage ist dann: Warum hat die Ausführung der Befehle im obigen Tutorial und das oben explizit erwähnte auch das Problem gelöst?

Bei der Ausführung des Befehls zum Entfernen von doppelten Paketen, bemerkte ich, dass die Ausgabe war, dass es in Wirklichkeit keine doppelten Pakete gab. Es scheint, in meinem Fall, dass die einzigen Befehle, die tatsächlich das Problem lösen waren (nicht sicher, obwohl):

yum clean all 
sudo yum update 

Warum sollte dies tatsächlich das Problem lösen?


Eine meiner Ideen ist, dass die Box eigentlich veraltet ist, da die Aktualisierung vorinstallierte Pakete auf die neuesten Versionen anscheinend das Problem gelöst ...

Antwort

0

Leider ein paar verschiedene Probleme gibt es Sie haben könnten behoben mit den Befehlen, die Sie eingegeben haben, und die ursprüngliche Installation gibt nicht viele Informationen.

Es ist möglich, dass das Originalbild ein Paket mit einem Fehler enthielt, der diese Installation verhinderte, aber sudo yum update behob das Problem durch Installieren eines aktualisierten Pakets.

Es ist auch möglich, dass die yum-Datenbank beschädigt war und keine Voraussetzung für nfs-utils oder nfs-utils-lib installiert wurde, da sie dachte, dass sie bereits installiert waren, aber die 'clean' die yum-Datenbank reparierte.

Dito auf Paketreinigung, die in yum-utils ist.

exactarch = 1 hat wahrscheinlich nichts korrigiert, da Sie nirgends eine bestimmte Architektur angegeben haben (vorausgesetzt, das Originalbild hat es auch nicht).

Klingt, als ob Sie es am Ende Ihrer Frage ziemlich genau herausgefunden hätten. Noch etwas?

0

Es gab eine bug in den CentOS 7 - Pakete, die diesen Fehler verursacht:

When updating only device-mapper subpackages, without updating lvm2 package, we may have ended up with file conflicts if files were moved around subpackages. ... To avoid problems when updating from older versions, there's direct conflict defined explicitly in the packages now which, if hit, will give an information about the minimum required version to resolve this conflict.

So ist eine Lösung lvm2 aktualisieren. Ich denke, dass yum update das Problem löste, da der Konflikt, der zu den Paketen hinzugefügt wurde, aus dem Paket-Repository als Teil der Paketinformationen geladen wurde. So, lvm2 wurde wahrscheinlich aktualisiert, wenn device-mapper von Vagrant installiert wurde und dieses Update den Fehler vermeidet.

+0

In Verbindung stehende Frage: http://stackoverflow.com/questions/36439746/failed-to-install-r-on-centos-7. Es scheint mir, dass ich die Fragen nicht verknüpfen kann. Ist es überhaupt möglich, einen Link manuell hinzuzufügen? – mm759

Verwandte Themen