Vagrant 错误:无法分析应用程序选项:无效选项:-manifestdir

Vagrant 错误:无法分析应用程序选项:无效选项:-manifestdir,vagrant,puppet,matomo,Vagrant,Puppet,Matomo,我正在尝试安装。根据说明,我克隆了repo,安装了Vagrant并执行了Vagrant up。进程以以下错误结束: Error: Could not parse application options: invalid option: --manifestdir 完整日志如下: Bringing machine 'default' up with 'virtualbox' provider... ==> default: Box 'trusty64' could not be found

我正在尝试安装。根据说明,我克隆了repo,安装了Vagrant并执行了
Vagrant up
。进程以以下错误结束:

Error: Could not parse application options: invalid option: --manifestdir
完整日志如下:

Bringing machine 'default' up with 'virtualbox' provider...
==> default: Box 'trusty64' could not be found. Attempting to find and install...
    default: Box Provider: virtualbox
    default: Box Version: >= 0
==> default: Box file was not detected as metadata. Adding it directly...
==> default: Adding box 'trusty64' (v0) for provider: virtualbox
    default: Downloading: https://cloud-images.ubuntu.com/vagrant/trusty/current/trusty-server-cloudimg-amd64-vagrant-disk1.box
    default: Progress: 100% (Rate: 1170k/s, Estimated time remaining: --:--:--)
==> default: Successfully added box 'trusty64' (v0) for 'virtualbox'!
==> default: Importing base box 'trusty64'...
==> default: Matching MAC address for NAT networking...
==> default: Setting the name of the VM: piwik-dev-environment_default_1438688840836_21904
==> 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: 22 => 2222 (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: Connection timeout. Retrying...
    default:
    default: Vagrant insecure key detected. Vagrant will automatically replace
    default: this with a newly generated keypair for better security.
    default:
    default: Inserting generated public key within guest...
    default: Removing insecure key from the guest if it's present...
    default: Key inserted! Disconnecting and reconnecting using new SSH key...
==> default: Machine booted and ready!
==> default: Checking for guest additions in VM...
==> default: Setting hostname...
==> default: Configuring and enabling network interfaces...
==> default: Mounting shared folders...
    default: /vagrant => D:/Git/piwik-dev-environment
    default: /etc/puppet/files => D:/Git/piwik-dev-environment/puppet/files
    default: /home/vagrant/www => D:/Git/piwik-dev-environment/www
    default: /tmp/vagrant-puppet/modules-48bf73244a40076992a5cef90c07f471 => D:/Git/piwik-dev-environment/puppet/modules
    default: /tmp/vagrant-puppet/manifests-768747907b90c39ab6f16fcb3320897a => D:/Git/piwik-dev-environment/puppet
==> default: Running provisioner: shell...
    default: Running: inline script
==> default: stdin: is not a tty
==> default: Reading package lists...
==> default: Building dependency tree...
==> default: Reading state information...
==> default: ruby is already the newest version.
==> default: 0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
==> default: Successfully installed facter-2.4.4
==> default: Successfully installed json_pure-1.8.2
==> default: Successfully installed hiera-3.0.1
==> default: Successfully installed puppet-4.2.1
==> default: 4 gems installed
==> default: Installing ri documentation for facter-2.4.4...
==> default: Installing ri documentation for json_pure-1.8.2...
==> default: Installing ri documentation for hiera-3.0.1...
==> default: Installing ri documentation for puppet-4.2.1...
==> default: Installing RDoc documentation for facter-2.4.4...
==> default: Installing RDoc documentation for json_pure-1.8.2...
==> default: Installing RDoc documentation for hiera-3.0.1...
==> default: Installing RDoc documentation for puppet-4.2.1...
==> default: Successfully installed hiera-3.0.1
==> default: 1 gem installed
==> default: Installing ri documentation for hiera-3.0.1...
==> default: Installing RDoc documentation for hiera-3.0.1...
==> default: Successfully installed hiera-1.3.4
==> default: Successfully installed hiera-puppet-1.0.0
==> default: 2 gems installed
==> default: Installing ri documentation for hiera-1.3.4...
==> default: Installing ri documentation for hiera-puppet-1.0.0...
==> default: Installing RDoc documentation for hiera-1.3.4...
==> default: Installing RDoc documentation for hiera-puppet-1.0.0...
==> default: Running provisioner: puppet...
==> default: Running Puppet with site.pp...
==> default: stdin: is not a tty
==> default: Error: Could not parse application options: invalid option: --manifestdir
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.  
我试图找到一个包含
--manifestdir
选项的文件,但没有找到任何文件。我还尝试应用与中相同的修补程序,但没有任何帮助


非常感谢您的帮助。

我认为这是由宝石行为造成的

我更改了SHELL provisioner来获取和安装deb repo,并为Ubuntu安装了Puppet包,我解决了这个问题

  config.vm.provision "shell", inline: <<-SHELL
    if [ ! -f /deb-get ]; then wget https://apt.puppetlabs.com/puppetlabs-release-trusty.deb  && sudo touch /deb-get; fi
    if [ ! -f /deb-run ]; then sudo dpkg -i puppetlabs-release-trusty.deb  && sudo touch /deb-run; fi
    if [ ! -f /apt-get-run ]; then sudo apt-get update && sudo touch /apt-get-run; fi
    if [ ! -f /apt-get-puppet ]; then sudo apt-get install --yes --force-yes puppet && sudo touch /apt-get-puppet; fi
  SHELL

  config.vm.provision :puppet do |puppet|
    puppet.manifests_path = "puppet"
    puppet.manifest_file  = "site.pp"
    puppet.module_path    = "puppet/modules"
    puppet.hiera_config_path = "hiera.yaml"
    puppet.options = "--verbose --debug"
    puppet.working_directory = "/tmp/vagrant-puppet"
    puppet.facter = [
        ['fdqn',  config.vm.hostname],
        ['db_username',  CONF['db_username']],
        ['db_password',  CONF['db_password']],
        ['ssh_username', CONF['ssh_username']],
    ]
  end

但是这些问题可以很容易地解决。

不幸的是,Piwik开发环境项目没有得到维护,也无法工作(许多问题在跟踪程序中是开放的)


我打开了一个pull请求,将Vagrant配置straigth嵌入到Piwik的存储库中(希望使用起来也更简单)。如果您觉得pull请求有用,请在该请求中进行注释:

似乎您正在尝试在来宾计算机上安装puppet4的情况下运行puppet Provisionier。--manifestdir选项现在已被弃用,并将导致错误。您必须向Vagrant文件中添加几个参数,以告知Vagrant您正在使用第四个版本的Puppet


您的问题解决方案如下所述:

您可以在repo中找到Vagrant文件:
pupped.manifest\u文件
已设置为
“site.pp”
()更新的答案,以反映我是如何将其用于repo的克隆的。更完整的解决方案/解释如下:
==> default: Warning: Could not retrieve fact fqdn
==> default: Error: Could not find class apt for piwik-trusty64 on node piwik-trusty64
==> default: Error: Could not find class apt for piwik-trusty64 on node piwik-trusty64