Chr*_*ini 2 make php5 centos6 ansible
这是错误消息:
cc: internal compiler error: Killed (program cc1)
Please submit a full bug report,
with preprocessed source if appropriate.
See <file:///usr/share/doc/gcc-4.6/README.Bugs> for instructions.
make: *** [ext/fileinfo/libmagic/apprentice.lo] Error 1
Run Code Online (Sandbox Code Playgroud)
make 处理的最后一件事是 apprentice.lo,它似乎是图像处理库的一部分(也许?)。我正在使用 Ansible 来配置我的实例。它是一个 Digital Ocean 单核 512MB 虚拟机。
我一直在使用 vagrant / ansible 在本地为 dev 使用相同的配置,并且编译良好,这是我尝试配置的第一个云 VM。唯一的区别是我的 DO 服务器的基本映像来自 DO,对于我的本地开发人员,我通过 VirtualBox 从一个库存的 CentOS 基本服务器安装构建了我自己的 Vagrant 框。我把它从我的 DropBox 中拉下来。
该问题已被其他人遇到并报告为php错误报告
我的 php ansible 角色直到错误:
---
- name: Download php source
get_url: url={{ php_source_url }} dest=/tmp
register: get_url_result
- name: untar the source package
command: tar -xvf php-{{ php_version }}.tar.gz chdir=/tmp
when: get_url_result.changed or php_reinstall
- name: configure php 5.5
command: >
./configure
--prefix={{ php_prefix }}
--with-config-file-path={{ php_config_file_path }}
--enable-fpm
--enable-ftp
--enable-mbstring
--enable-pdo
--enable-soap
--enable-sockets=shared
--enable-zip
--with-curl
--with-fpm-group={{ nginx_group }}
--with-fpm-user={{ nginx_user }}
--with-freetype-dir=/usr/lib64/
--with-gd
--with-jpeg-dir=/usr/lib64/
--with-libdir=lib64
--with-mcrypt
--with-openssl
--with-pdo-mysql
--with-pear
--with-readline
--with-tidy
--with-xsl
--with-zlib
--without-pdo-sqlite
--without-sqlite3
chdir=/tmp/php-{{ php_version }}
when: get_url_result.changed or php_reinstall
- name: make clean when reinstalling
command: make clean chdir=/tmp/php-{{ php_version }}
when: php_reinstall
- name: make php
command: make chdir=/tmp/php-{{ php_version }}
when: get_url_result.changed or php_reinstall
Run Code Online (Sandbox Code Playgroud)
在此先感谢您的帮助。:)
这是由于 OOM(内存不足)事件导致编译器进程被终止,我能够在“一些 Linux 书呆子”的帮助下确定这一点。当您不能只向机器添加内存时,为了避免这种情况,我使用了交换文件。这是我在这里找到的我使用的命令:
dd if=/dev/zero of=/swapfile bs=1024 count=262144
mkswap /swapfile
swapon /swapfile
Run Code Online (Sandbox Code Playgroud)
我没有让它在重启后持续存在,因为 512MB 足以满足我每天需要这个盒子的需求,所以我省略了那个命令。我在 PHP 源代码上重新运行我的 make 并成功完成。
归档时间: |
|
查看次数: |
3259 次 |
最近记录: |