Vagrant 流浪小狗不使用Samba(smb)开箱即用

Vagrant 流浪小狗不使用Samba(smb)开箱即用,vagrant,vagrantfile,puphpet,vagrant-provision,Vagrant,Vagrantfile,Puphpet,Vagrant Provision,所以我在几天的时间里就遇到了这个问题。 每次我将sync_type设置为smbvagrant up失败时,都尝试了puphpet.com中的每个操作系统。错误输出: Failed to mount folders in Linux guest. This is usually because the "vboxsf" file system is not available. Please verify that the guest additions are properl

所以我在几天的时间里就遇到了这个问题。 每次我将sync_type设置为smbvagrant up失败时,都尝试了puphpet.com中的每个操作系统。错误输出:

Failed to mount folders in Linux guest. This is usually because
the "vboxsf" file system is not available. Please verify that
the guest additions are properly installed in the guest and
can work properly. The command attempted was:

mount -t cifs -o uid=`id -u www-data`,gid=`getent group www-data | cut -d: -f3`,dir_mode=0775,file_mode=0664,sec=ntlm,credentials=/etc/smb_creds_24f79a72536bca2b335860f233950314 ///24f79a72536bca2b335860f233950314 /var/www
mount -t cifs -o uid=`id -u www-data`,gid=`id -g www-data`,dir_mode=0775,file_mode=0664,sec=ntlm,credentials=/etc/smb_creds_24f79a72536bca2b335860f233950314 ///24f79a72536bca2b335860f233950314 /var/www

The error output from the last command was:

mount: wrong fs type, bad option, bad superblock on ///24f79a72536bca2b335860f233950314,
       missing codepage or helper program, or other error
       (for several filesystems (e.g. nfs, cifs) you might
       need a /sbin/mount.<type> helper program)
       In some cases useful info is found in syslog - try
       dmesg | tail  or so
因此,当通过leve将框同步到默认值时 在第一次引导vagrant ssh到您的机器并运行sudoyum安装cifs-utilsfor centos之后 或者sudo-apt-get-install cifs-utils用于ubuntu

另一种方法是,在构建框时,在系统软件包下指定cifs utils,然后使用默认的同步类型运行,让它安装所有软件包,在首次启动后,将同步类型更改为smb并重新加载

要记住的是,您必须第一次使用默认的sync_类型运行,并让vagrant进行配置、安装所有软件包和配置。然后将sync_type更改为smb并重新加载,因此主要问题是缺少cifs utils。另一个与此问题无关的问题是,如果将smb_主机留空,它也会失败。将其从smb\u主机:'更改为smb\u主机:(请勿在:'之后留下空白)。必须在config.yaml文件中进行更改。

因此,当通过leavesync\u type创建box时,必须将其设置为默认值 在第一次引导vagrant ssh到您的机器并运行sudoyum安装cifs-utilsfor centos之后 或者sudo-apt-get-install cifs-utils用于ubuntu

另一种方法是,在构建框时,在系统软件包下指定cifs utils,然后使用默认的同步类型运行,让它安装所有软件包,在首次启动后,将同步类型更改为smb并重新加载

要记住的是,您必须第一次使用默认的sync_类型运行,并让vagrant进行配置、安装所有软件包和配置。然后将sync_type更改为smb并重新加载,因此主要问题是缺少cifs utils。另一个与此问题无关的问题是,如果将smb_主机留空,它也会失败。将其从smb\u主机:'更改为smb\u主机:(请勿在:'之后留下空白)。可以在config.yaml文件中进行更改

==> pup-machine1: [vagrant-hostsupdater] Checking for host entries
==> pup-machine1: [vagrant-hostsupdater]   found entry for: 192.168.56.110 testpup.dev
==> pup-machine1: Running provisioner: shell...
    pup-machine1: Running: inline script
==> pup-machine1: sed: can't read /vagrant/puphpet/shell/*.sh: No such file or directory
The SSH command responded with a non-zero exit status. Vagrant
assumes that this means the command failed. The output for this command
should be in the log above. Please read the output to determine what
went wrong.