LoginSignup
1
1

More than 5 years have passed since last update.

Vagrantでnfsに設定するとエラーが起きる

Posted at

問題

Vagrantfileのconfig.vm.synced_folderの設定は以下の通り。

config.vm.synced_folder ".", "/vagrant/", type: "nfs"

vagrant up または reloadしたらエラーが起きた。


The following SSH command responded with a non-zero exit status.
Vagrant assumes that this means the command failed!

if command -v dnf; then
  dnf -y install nfs-utils nfs-utils-lib portmap
else
  yum -y install nfs-utils nfs-utils-lib portmap
fi

if test $(ps -o comm= 1) == 'systemd'; then
  /bin/systemctl restart rpcbind nfs
else
  /etc/init.d/rpcbind restart
  /etc/init.d/nfs restart
fi

Stdout from the command:

Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
 * base: ftp.riken.jp
 * extras: ftp.riken.jp
 * updates: ftp.riken.jp
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

...(省略)...

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
-------------

Failed to issue method call: Unit rpcbind.service failed to load: No such file or directory.
Failed to issue method call: Unit nfs.service failed to load: No such file or directory.

解決方法

vagrant ssh をして中に入り、以下のコマンドを打つ。

yum upgrade lvm2
sudo yum install nfs-utils

参考記事

1
1
1

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
1