2016-10-13 18 views
0

私はthis tutorialをフォローしています。しかし、それは動作していないようです。Wordpress + Vagrant:SSHコマンドがゼロ以外の終了ステータスで応答しました

私は、次を得る:

==> default: gpg: 
==> default: keyring `/tmp/tmpJZaDWh/secring.gpg' created 
==> default: gpg: 
==> default: keyring `/tmp/tmpJZaDWh/pubring.gpg' created 
==> default: gpg: 
==> default: requesting key E5267A6C from hkp server keyserver.ubuntu.com 
==> default: gpg: 
==> default: /tmp/tmpJZaDWh/trustdb.gpg: trustdb created 
==> default: gpg: 
==> default: key E5267A6C: public key "Launchpad PPA for Ond\xc5\x99ej Sur?" imported 
==> default: gpg: 
==> default: Total number processed: 1 
==> default: gpg: 
==> default:    imported: 1 
==> default: (RSA: 1) 

、その後:

==> default: E 
==> default: : 
==> default: Unable to correct problems, you have held broken packages. 
==> default: tee: 
==> default: /etc/php5/mods-available/xdebug.ini 
==> default: : No such file or directory 
==> default: xdebug.scream=1 
==> default: xdebug.cli_color=1 
==> default: xdebug.show_local_vars=1 
==> default: sudo 
==> default: : 
==> default: a2enmod: command not found 
==> default: sed: can't read /etc/php5/apache2/php.ini: No such file or directory 
==> default: sed: can't read /etc/php5/apache2/php.ini: No such file or directory 
==> default: sed: can't read /etc/php5/cli/php.ini: No such file or directory 
==> default: apache2: unrecognized service 
==> default: /tmp/vagrant-shell: line 26: php: command not found 
==> default: mv: 
==> default: cannot stat `composer.phar' 
==> default: : 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. 

私は本当に、これは何を意味するのか分からない、または問題がある可能性があり場所。バゲントは動作しますが、私は間違いなく前にバグのボックスを起動することができました。上記のチュートリアルの文脈の中で私は問題にぶつかります。

編集: ここのアドバイスに従って、私は変更しました。& install.sh。しかし、私はまだ同じエラーが発生します。ここに私の修正されたファイルは、次のとおりです。

Vagrantfile

# -*- mode: ruby -*- 
# vi: set ft=ruby : 

# Vagrantfile API/syntax version. Don't touch unless you know what you're doing! 
VAGRANTFILE_API_VERSION = "2" 

Vagrant.configure(VAGRANTFILE_API_VERSION) do |config| 
    config.vm.box = "ubuntu/precise64" 
    config.vm.network :private_network, ip: "192.168.33.21" 
    config.vm.provision :shell, :path => "install.sh" 
    config.vm.synced_folder ".", "/var/www" 

end 

install.sh

sudo apt-get update 

sudo debconf-set-selections <<< 'mysql-server mysql-server/root_password password root' 
sudo debconf-set-selections <<< 'mysql-server mysql-server/root_password_again password root' 

sudo apt-get install -y vim curl python-software-properties 
sudo add-apt-repository ppa:ondrej/php5 
sudo apt-get update 

sudo apt-get install -y php5 apache2 libapache2-mod-php5 php5-curl php5-gd php5-mcrypt php5-readline mysql-server-5.5 php5-mysql git-core php5-xdebug 

cat << EOF | sudo tee -a /etc/php5/mods-available/xdebug.ini 
xdebug.scream=1 
xdebug.cli_color=1 
xdebug.show_local_vars=1 
EOF 

sudo a2enmod rewrite 

sed -i "s/error_reporting = .*/error_reporting = E_ALL/" /etc/php5/apache2/php.ini 
sed -i "s/display_errors = .*/display_errors = On/" /etc/php5/apache2/php.ini 
sed -i "s/disable_functions = .*/disable_functions = /" /etc/php5/cli/php.ini 

sudo service apache2 restart 

curl -sS https://getcomposer.org/installer | php 
sudo mv composer.phar /usr/local/bin/composer 

答えて

0

私はこのチュートリアルは少し古いですし、確かにいくつかの古い情報が含まれていると思います。

チュートリアルで使用precise64ボックスは、最後の2年間に更新されていない

は、このボックスのより新しいバージョンを使用する必要があります日付ボックスまで使うので、交換してください

config.vm.box = "precise64" 
    config.vm.box_url = "http://files.vagrantup.com/precise64.box" 
1行を持つ

config.vm.box = "ubuntu/precise64" 

浮浪者は自動的にアトラス

からボックスをダウンロードしますこのPPAは廃止されようとしている

PHPのレポは、例で使用するPHPレポ

時代遅れであることはdeprecated

されている、PPAを使用してください:オンドレイ/ PHP

あなたが他のPHPを必要とする場合バージョンは使用:

PHP 5.4: ppa:ondrej/php5-oldstable (Ubuntu 12.04 LTS) 
    PHP 5.5, PHP 5.6 and PHP 7.0: ppa:ondrej/php (Ubuntu 14.04 LTS - Ubuntu 16.04 LTS) 

をので、install.shスクリプトが

なりますこの2つの変更により
sudo apt-get update 

sudo debconf-set-selections <<< 'mysql-server mysql-server/root_password password root' 
sudo debconf-set-selections <<< 'mysql-server mysql-server/root_password_again password root' 

sudo apt-get install -y vim curl python-software-properties 
sudo add-apt-repository -y ppa:ondrej/php5-oldstable 
sudo apt-get update 

sudo apt-get install -y php5 apache2 libapache2-mod-php5 php5-curl php5-gd php5-mcrypt php5-readline mysql-server-5.5 php5-mysql git-core php5-xdebug 

sudo a2enmod rewrite 

sed -i "s/error_reporting = .*/error_reporting = E_ALL/" /etc/php5/apache2/php.ini 
sed -i "s/display_errors = .*/display_errors = On/" /etc/php5/apache2/php.ini 
sed -i "s/disable_functions = .*/disable_functions = /" /etc/php5/cli/php.ini 

sudo service apache2 restart 

curl -sS https://getcomposer.org/installer | php 
sudo mv composer.phar /usr/local/bin/composer 

、それはすでに、より良い状態であなたを取得する必要があります - それは起動しますが、そのかなり古いポストは、今言ったように、あなたが開発を探している場合は、スタックをアップグレードすることになります -

+0

ありがとう。私は2番目のステップ(php repoが古くなっています)でも正確に何をするのか分かりません。 'installの中で –

+0

です。'sudo add-apt-repository -y ppa:ondrej/php5'があります。このレポは古くなっていますので、メッセージの2つの値のうちの1つに置き換える必要があります。 –

+0

申し訳ありません、私はまだだと思います私は絶対初心者です。私は 'sudo add-apt-repository -y ppa:ondrej/php5'を 'sudo add-apt-repository -y ppa:ondrej/php'に置き換えましたが、それでも私にはエラーが出ます。あなたは正しくそこにいますか?メッセージの2つの値はどちらですか? –

関連する問題