gpt4 book ai didi

ruby - 在 Vagrant 盒子内使用 librarian-puppet - 为什么 puppetlabs/mysql 安装失败?

转载 作者:数据小太阳 更新时间:2023-10-29 08:12:25 27 4
gpt4 key购买 nike

我在 Vagrant 虚拟机中通过 librarian-puppet 安装 puppetlabs/mysql 时遇到问题。经过大量对话,似乎最有可能的问题是 VirtualBox 不允许共享目录内的符号链接(symbolic link),但是在应用 vb.customize ["setextradata", :id, "VBoxInternal2/SharedFoldersEnableSymlinksCreate/v- root", "1"] 我看不到行为有任何变化,所以我想知道到底是哪个组件出了问题 - Vagrant、Ruby、Puppet、Librarian、puppetlabs/mysql 模块,或者(大多数可能)我?

在主机上:

$ vagrant --version
Vagrant 1.4.3

在 Vagrant 盒子上:

$ uname -a
Linux host 3.2.0-58-generic #88-Ubuntu SMP Tue Dec 3 17:40:43 UTC 2013 i686 i686 i386 GNU/Linux

$ which ruby
/home/vagrant/.rbenv/shims/ruby

$ ruby --version
ruby 1.9.3p484 (2013-11-22 revision 43786) [i686-linux]

$ bundle --version
Bundler version 1.5.3

$ cat Gemfile.lock | grep -A 3 librarian-puppet
librarian-puppet (0.9.13)
json
librarian (>= 0.1.2)
open3_backport

这是我的Puppetfile:

forge 'http://forge.puppetlabs.com'

# Stuff that we need directly.
mod 'puppetlabs/stdlib'

# 3rd party modules we proxy.
mod 'jfryman/nginx'
mod 'puppetlabs/mysql'
mod 'saz/memcached'
mod 'thomasvandoren/redis'

下面是当我尝试应用上述 Puppetfile 时发生的情况。

$ librarian-puppet install --verbose
[Librarian] Ruby Version: 1.9.3
[Librarian] Ruby Platform: i686-linux
[Librarian] Rubygems Version: 1.8.23
[Librarian] Librarian Version: 0.1.2
[Librarian] Librarian Adapter: puppet
[Librarian] Librarian Adapter Version: 0.9.13
[Librarian] Project: /vagrant
[Librarian] Specfile: Puppetfile
[Librarian] Lockfile: Puppetfile.lock
[Librarian] Git: /usr/bin/git
[Librarian] Git Version: 1.7.9.5
[Librarian] Git Environment Variables:
[Librarian] (empty)
[Librarian] Pre-Cached Sources:
[Librarian] [:forge, "http://forge.puppetlabs.com", {}]
[Librarian] Post-Cached Sources:
[Librarian] [:forge, "http://forge.puppetlabs.com", {}]
[Librarian] The specfile is unchanged: nothing to do.
[Librarian] Install: dependencies resolved
[Librarian] Pre-Cached Sources:
[Librarian] Post-Cached Sources:
[Librarian] [:forge, "http://forge.puppetlabs.com", {}]
[Librarian] Executing puppet module install for puppetlabs/stdlib 4.1.0
[Librarian] Executing puppet module install for puppetlabs/apt 1.4.1
[Librarian] Executing puppet module install for puppetlabs/concat 1.1.0-rc1
[Librarian] Executing puppet module install for jfryman/nginx 0.0.7
[Librarian] Executing puppet module install for maestrodev/wget 1.3.1
[Librarian] Executing puppet module install for puppetlabs/firewall 1.0.0
[Librarian] Failed to copy from /vagrant/.tmp/librarian/cache/source/puppet/forge/3792e516e3ff92a0ef9f5e827f8e76eb/puppetlabs/firewall/version/47cd76e43f74bbc2e1baaf194d07e1fa/firewall to /vagrant/modules/firewall preserving file types, trying again without preserving them
[Librarian] Executing puppet module install for puppetlabs/gcc 0.1.0
[Librarian] Executing puppet module install for puppetlabs/mysql 2.2.0
Error: No such file or directory - /vagrant/.tmp/librarian/cache/source/puppet/forge/3792e516e3ff92a0ef9f5e827f8e76eb/puppetlabs/mysql/version/34e90de1478e8a54af7fd56d4a3a7102/mysql/spec/fixtures/modules/mysql
Error: Try 'puppet help module install' for usage
/home/vagrant/.rbenv/versions/1.9.3-p484/lib/ruby/gems/1.9.1/gems/librarian-puppet-0.9.13/lib/librarian/puppet/source/forge.rb:114:in `unlink': Directory not empty - /vagrant/.tmp/librarian/cache/source/puppet/forge/3792e516e3ff92a0ef9f5e827f8e76eb/puppetlabs/mysql/version/34e90de1478e8a54af7fd56d4a3a7102 (Errno::ENOTEMPTY)
from /home/vagrant/.rbenv/versions/1.9.3-p484/lib/ruby/gems/1.9.1/gems/librarian-puppet-0.9.13/lib/librarian/puppet/source/forge.rb:114:in `unlink'
from /home/vagrant/.rbenv/versions/1.9.3-p484/lib/ruby/gems/1.9.1/gems/librarian-puppet-0.9.13/lib/librarian/puppet/source/forge.rb:114:in `cache_version_unpacked!'
from /home/vagrant/.rbenv/versions/1.9.3-p484/lib/ruby/gems/1.9.1/gems/librarian-puppet-0.9.13/lib/librarian/puppet/source/forge.rb:57:in `install_version!'
from /home/vagrant/.rbenv/versions/1.9.3-p484/lib/ruby/gems/1.9.1/gems/librarian-puppet-0.9.13/lib/librarian/puppet/source/forge.rb:263:in `install!'
from /home/vagrant/.rbenv/versions/1.9.3-p484/lib/ruby/gems/1.9.1/gems/librarian-0.1.2/lib/librarian/manifest.rb:101:in `install!'
from /home/vagrant/.rbenv/versions/1.9.3-p484/lib/ruby/gems/1.9.1/gems/librarian-0.1.2/lib/librarian/action/install.rb:49:in `block in install_manifests'
from /home/vagrant/.rbenv/versions/1.9.3-p484/lib/ruby/gems/1.9.1/gems/librarian-0.1.2/lib/librarian/action/install.rb:48:in `each'
from /home/vagrant/.rbenv/versions/1.9.3-p484/lib/ruby/gems/1.9.1/gems/librarian-0.1.2/lib/librarian/action/install.rb:48:in `install_manifests'
from /home/vagrant/.rbenv/versions/1.9.3-p484/lib/ruby/gems/1.9.1/gems/librarian-0.1.2/lib/librarian/action/install.rb:39:in `perform_installation'
from /home/vagrant/.rbenv/versions/1.9.3-p484/lib/ruby/gems/1.9.1/gems/librarian-0.1.2/lib/librarian/action/install.rb:12:in `run'
from /home/vagrant/.rbenv/versions/1.9.3-p484/lib/ruby/gems/1.9.1/gems/librarian-0.1.2/lib/librarian/cli.rb:165:in `install!'
from /home/vagrant/.rbenv/versions/1.9.3-p484/lib/ruby/gems/1.9.1/gems/librarian-puppet-0.9.13/lib/librarian/puppet/cli.rb:71:in `install'
from /home/vagrant/.rbenv/versions/1.9.3-p484/lib/ruby/gems/1.9.1/gems/thor-0.18.1/lib/thor/command.rb:27:in `run'
from /home/vagrant/.rbenv/versions/1.9.3-p484/lib/ruby/gems/1.9.1/gems/thor-0.18.1/lib/thor/invocation.rb:120:in `invoke_command'
from /home/vagrant/.rbenv/versions/1.9.3-p484/lib/ruby/gems/1.9.1/gems/thor-0.18.1/lib/thor.rb:363:in `dispatch'
from /home/vagrant/.rbenv/versions/1.9.3-p484/lib/ruby/gems/1.9.1/gems/thor-0.18.1/lib/thor/base.rb:439:in `start'
from /home/vagrant/.rbenv/versions/1.9.3-p484/lib/ruby/gems/1.9.1/gems/librarian-0.1.2/lib/librarian/cli.rb:26:in `block (2 levels) in bin!'
from /home/vagrant/.rbenv/versions/1.9.3-p484/lib/ruby/gems/1.9.1/gems/librarian-0.1.2/lib/librarian/cli.rb:31:in `returning_status'
from /home/vagrant/.rbenv/versions/1.9.3-p484/lib/ruby/gems/1.9.1/gems/librarian-0.1.2/lib/librarian/cli.rb:26:in `block in bin!'
from /home/vagrant/.rbenv/versions/1.9.3-p484/lib/ruby/gems/1.9.1/gems/librarian-0.1.2/lib/librarian/cli.rb:47:in `with_environment'
from /home/vagrant/.rbenv/versions/1.9.3-p484/lib/ruby/gems/1.9.1/gems/librarian-0.1.2/lib/librarian/cli.rb:26:in `bin!'
from /home/vagrant/.rbenv/versions/1.9.3-p484/lib/ruby/gems/1.9.1/gems/librarian-puppet-0.9.13/bin/librarian-puppet:7:in `<top (required)>'
from /home/vagrant/.rbenv/versions/1.9.3-p484/bin/librarian-puppet:23:in `load'
from /home/vagrant/.rbenv/versions/1.9.3-p484/bin/librarian-puppet:23:in `<main>'

值得注意的是,如果我第二次运行完全相同的命令,它将一直运行到完成:

$ librarian-puppet install --verbose
[Librarian] Ruby Version: 1.9.3
[Librarian] Ruby Platform: i686-linux
[Librarian] Rubygems Version: 1.8.23
[Librarian] Librarian Version: 0.1.2
[Librarian] Librarian Adapter: puppet
[Librarian] Librarian Adapter Version: 0.9.13
[Librarian] Project: /vagrant
[Librarian] Specfile: Puppetfile
[Librarian] Lockfile: Puppetfile.lock
[Librarian] Git: /usr/bin/git
[Librarian] Git Version: 1.7.9.5
[Librarian] Git Environment Variables:
[Librarian] (empty)
[Librarian] Pre-Cached Sources:
[Librarian] [:forge, "http://forge.puppetlabs.com", {}]
[Librarian] Post-Cached Sources:
[Librarian] [:forge, "http://forge.puppetlabs.com", {}]
[Librarian] The specfile is unchanged: nothing to do.
[Librarian] Install: dependencies resolved
[Librarian] Pre-Cached Sources:
[Librarian] Post-Cached Sources:
[Librarian] [:forge, "http://forge.puppetlabs.com", {}]
[Librarian] Failed to copy from /vagrant/.tmp/librarian/cache/source/puppet/forge/3792e516e3ff92a0ef9f5e827f8e76eb/puppetlabs/firewall/version/47cd76e43f74bbc2e1baaf194d07e1fa/firewall to /vagrant/modules/firewall preserving file types, trying again without preserving them
[Librarian] Failed to copy from /vagrant/.tmp/librarian/cache/source/puppet/forge/3792e516e3ff92a0ef9f5e827f8e76eb/puppetlabs/mysql/version/34e90de1478e8a54af7fd56d4a3a7102/mysql to /vagrant/modules/mysql preserving file types, trying again without preserving them
[Librarian] Executing puppet module install for saz/memcached 2.4.0
[Librarian] Executing puppet module install for thomasvandoren/redis 0.0.9

在我看来,那些 Failed to copy from 错误可能是相关的,但我不知道如何理解它们。

最佳答案

通过跟进,这个问题在除 mysql 之外的多个其他模块中重复出现 - 表面上看,问题是这些模块试图在 Vagrant 共享目录中创建符号链接(symbolic link)(这不起作用 [如预期]) .

关于ruby - 在 Vagrant 盒子内使用 librarian-puppet - 为什么 puppetlabs/mysql 安装失败?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/21884787/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com