Homestead配置错误

时间:2014-10-28 09:42:30

标签: laravel vagrant

因为我需要在我的webapp中使用LDAP功能,所以需要在我的Homestead框中配置&sudo apt-get install php5-ldap'

所以在我的homestead.rb中我补充道:

# Install addons like LDAP support
config.vm.provision "shell" do |s|
  s.inline = "bash /vagrant/scripts/addons.sh"
end

在addons.sh中我有:

 echo "************** ADDONS ********************" 
 echo "******************************************"
 echo "** INSTALLING php5-ldap **" 
 sudo apt-get update
 sudo apt-get install php5-ldap

它工作了将近5个月,但突然间我在配置过程中遇到错误:

==> default: Running provisioner: shell...
default: Running: inline script
==> default: Running provisioner: shell...
    default: Running: inline script
==> default: stdin: is not a tty
==> default: Running provisioner: shell...
    default: Running: inline script
==> default: stdin: is not a tty
==> default: ************** ADDONS ********************
==> default: ******************************************
==> default: ** INSTALLING php5-ldap **
==> default: E
==> default: :
==> default: Invalid operation update
==> default: Reading package lists...
==> default: Building dependency tree...
==> default: Reading state information...
==> default: The following packages were automatically installed and are no longer required:
==> default:   libdrm-intel1 libdrm-nouveau2 libdrm-radeon1 libfontenc1 libgl1-mesa-dri
==> default:   libgl1-mesa-glx libglapi-mesa libice6 libllvm3.4 libpciaccess0 libpixman-1-0
==> default:   libsm6 libtxc-dxtn-s2tc0 libx11-xcb1 libxaw7 libxcb-dri2-0 libxcb-dri3-0
==> default:   libxcb-glx0 libxcb-present0 libxcb-sync1 libxcomposite1 libxdamage1
==> default:   libxfixes3 libxfont1 libxkbfile1 libxmu6 libxrandr2 libxrender1
==> default:   libxshmfence1 libxt6 libxxf86vm1 x11-common x11-xkb-utils xfonts-base
==> default:   xfonts-encodings xfonts-utils xserver-common xserver-xorg-core
==> default: Use 'apt-get autoremove' to remove them.
==> default: The following extra packages will be installed:
==> default:   php5-cli php5-common php5-curl php5-fpm php5-gd php5-gmp php5-imap
==> default:   php5-mcrypt php5-mysqlnd php5-pgsql php5-readline php5-sqlite
==> default: The following NEW packages will be installed:
==> default:   php5-ldap
==> default: The following packages will be upgraded:
==> default:   php5-cli php5-common php5-curl php5-fpm php5-gd php5-gmp php5-imap
==> default:   php5-mcrypt php5-mysqlnd php5-pgsql php5-readline php5-sqlite
==> default: 12 upgraded, 1 newly installed, 0 to remove and 51 not upgraded.
==> default: Need to get 5,332 kB of archives.
==> default: After this operation, 132 kB of additional disk space will be used.
==> default: Do you want to continue?
==> default:  [Y/n]
==> default: Abort.
The following SSH command responded with a non-zero exit status.
Vagrant assumes that this means the command failed!

chmod +x /tmp/vagrant-shell && /tmp/vagrant-shell

Stdout from the command:

************** ADDONS ********************
******************************************
** INSTALLING php5-ldap **
Reading package lists...
Building dependency tree...
Reading state information...
The following packages were automatically installed and are no longer required:
  libdrm-intel1 libdrm-nouveau2 libdrm-radeon1 libfontenc1 libgl1-mesa-dri
  libgl1-mesa-glx libglapi-mesa libice6 libllvm3.4 libpciaccess0 libpixman-1-0
  libsm6 libtxc-dxtn-s2tc0 libx11-xcb1 libxaw7 libxcb-dri2-0 libxcb-dri3-0
  libxcb-glx0 libxcb-present0 libxcb-sync1 libxcomposite1 libxdamage1
  libxfixes3 libxfont1 libxkbfile1 libxmu6 libxrandr2 libxrender1
  libxshmfence1 libxt6 libxxf86vm1 x11-common x11-xkb-utils xfonts-base
  xfonts-encodings xfonts-utils xserver-common xserver-xorg-core
Use 'apt-get autoremove' to remove them.
The following extra packages will be installed:
  php5-cli php5-common php5-curl php5-fpm php5-gd php5-gmp php5-imap
  php5-mcrypt php5-mysqlnd php5-pgsql php5-readline php5-sqlite
The following NEW packages will be installed:
  php5-ldap
The following packages will be upgraded:
  php5-cli php5-common php5-curl php5-fpm php5-gd php5-gmp php5-imap
  php5-mcrypt php5-mysqlnd php5-pgsql php5-readline php5-sqlite
12 upgraded, 1 newly installed, 0 to remove and 51 not upgraded.
Need to get 5,332 kB of archives.
After this operation, 132 kB of additional disk space will be used.
Do you want to continue? [Y/n] Abort.


Stderr from the command:

stdin: is not a tty
E: Invalid operation update

这里出了什么问题? 我花了将近9个小时来调试这个:p 唯一的解决方法是将脚本和SSH删除到框中并手动安装php5-ldap

0 个答案:

没有答案