J'essaie d'installer ruby en utilisant homebrew, en utilisant le chef, exécuté par un script vagabond dans une VMWare fusion VM exécutant mac os x 10.8.5.Autorisations Erreur lors de l'installation de ruby via homebrew via le chef via vagrant sur osx
Pendant l'installation Ruby, je reçois l'erreur suivante:
Mixlib::ShellOut::ShellCommandFailed
------------------------------------
Expected process to exit with [0], but received '1'
---- Begin output of brew install ruby ----
STDOUT: ==> Installing dependencies for ruby: pkg-config, readline, libyaml, openssl
==> Installing ruby dependency: pkg-config
==> Downloading https://downloads.sf.net/project/machomebrew/Bottles/pkg-config- 0.28.mountain_lion.bottle.tar.gz
==> Pouring pkg-config-0.28.mountain_lion.bottle.tar.gz
/usr/local/Cellar/pkg-config/0.28: 10 files, 636K
==> Installing ruby dependency: readline
==> Downloading https://downloads.sf.net/project/machomebrew/Bottles/readline-6.2.4.mountain_lion.bottle.tar.gz
==> Pouring readline-6.2.4.mountain_lion.bottle.tar.gz
==> Caveats
This formula is keg-only: so it was not symlinked into /usr/local.
OS X provides the BSD libedit library, which shadows libreadline.
In order to prevent conflicts when programs look for libreadline we are
defaulting this GNU Readline installation to keg-only.
Generally there are no consequences of this for you. If you build your
own software and it requires this formula, you'll need to add to your
build variables:
LDFLAGS: -L/usr/local/opt/readline/lib
CPPFLAGS: -I/usr/local/opt/readline/include
==> Summary
/usr/local/Cellar/readline/6.2.4: 31 files, 1.6M
==> Installing ruby dependency: libyaml
==> Downloading http://pyyaml.org/download/libyaml/yaml-0.1.4.tar.gz
STDERR: Error: Permission denied - /var/root/Library/Logs
---- End output of brew install ruby ----
Ran brew install ruby returned 1
J'ai aussi eu cette erreur quand j'ai essayé d'installer rbenv en utilisant homebrew, qui a échoué l'installation autoconf. Je ne sais pas pourquoi il essaie d'accéder à/var/root /. Lorsque je lance "brew install autoconf" à partir de la machine virtuelle, il s'installe correctement.
J'ai aussi essayé d'ajouter:
node.default['homebrew']['owner'] = 'vagrant'
à ma recette juste pour vous assurer que l'installation homebrew utilisait l'utilisateur local, mais il n'a fait aucune différence.
Ma recette ressemble à ceci:
# required for homebrew
bash "take-usr-local-ownership" do
user "vagrant"
cwd "/"
code <<-EOH
sudo mkdir -p /usr/local
sudo chown -R `whoami`:staff /usr/local
EOH
end
include_recipe 'homebrew'
# Install each of the packages using the `package` resource
%w(ruby).each do |package|
package package
end
Toutes les idées?