2016-10-13 2 views
0

나는 방역 제로 Wordpress를 설정하기 위해 this tutorial을 따르고 있습니다. 그러나 그것은 효과가없는 것처럼 보입니다. 정말,Wordpress + Vagrant : SSH 명령이 0이 아닌 종료 상태로 응답했습니다.

==> 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. 

나도 몰라이 무엇을 의미하는지, 또는 문제가 어디에 거짓말 수 : 다음

==> 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) 

과 :

나는 다음과 같은 얻을. 방랑자가 작동하지만 오류없이 방황하는 상자를 시작할 수있었습니다. 위에서 언급 한 튜토리얼의 맥락에서 문제가 발생합니다.

편집 : 여기에 충고 한 내용에 따라 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" 
한 줄에

것은

config.vm.box = "ubuntu/precise64" 

방랑 자동 아틀라스에서 상자를 다운로드합니다

,363,210

의 PHP의 repo는 오래된

예에서 사용되는 PHP는 환매 특약이있다

이 PPA는, PPA 사용하시기 바랍니다 될 것입니다 deprecated

: 다른 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

감사합니다. 나는 두 번째 단계에서 정확히 무엇을해야하는지 이해하지 못한다. (php repo는 시대에 뒤 떨어진다.) –

+0

을 설치하십시오.sh' 스크립트에는'sudo add-apt-repository -y ppa : ondrej/php5'가 있습니다.이 저장소는 구식이어서 메시지의 2 개 값 중 하나로 바꾸어야합니다. –

+0

죄송합니다, 아직 제가 생각합니다. 나는 절대적인 초보자입니다. 나는 'sudo add-apt-repository -y ppa : ondrej/php5'를 'sudo add-apt-repository -y ppa : ondrej/php'로 바꾸었지만 여전히 오류가 있으므로 이해하지 못했다고 생각합니다. 너 거기 제대로 있니? 메시지의 두 가지 값을 의미합니까? –

관련 문제