LoginSignup
1
1

More than 5 years have passed since last update.

PHP Source Install virtual memory exhausted Error (Vagrant/Virtualbox)

Posted at

Error

vagrant provisionでchef-soloを動かし、phpソースインストール中に以下のエラーが発生
STDERR: cc: Internal error: Killed (program cc1)
Please submit a full bug report.
See <http://bugzilla.redhat.com/bugzilla> for instructions.
make: *** [ext/fileinfo/libmagic/apprentice.lo] Error 1
virtual memory exhausted: Cannot allocate memory
make: *** [ext/fileinfo/libmagic/apprentice.lo] Error 1
cp: cannot create regular file `/usr/local/php-5.5.4/lib/php.ini': No such file or directory

Cause

コンパイル実行機のメモリ不足

Fix

Vagrantfileの設定に以下を記述して1024mbでvmを起動する
config.vm.provider :virtualbox do |vb|
  vb.customize ["modifyvm", :id, "--memory", "1024"]
end
## 
## VM再起動
## 
vagrant halt
vagrant up

Check the Fix

## 
## VMログインしてメモリを確認
## 

vagrant ssh
hostname
  # (vagrant host)
head /proc/meminfo
  # MemTotal:        1020348 kB

1
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
1