Category: LAMP

Ubuntu搭建LAMP环境(安装libxml)出现问题

由于项目需要,得在自己的机器上搭建一套PHP开发环境。在安装libxml2-2.6.30,用make的时候出现以下问题。如下图所示。 In function ‘open’,inlined from ‘xmlNanoHTTPSave__internal_alias’ at nanohttp.c:1588:12: /usr/include/i386-linux-gnu/bits/fcntl2.h:51:24: error: call to ‘__open_missing_mode’ declared with attribute error: open with O_CREAT in second argument needs 3 arguments 解决办法: 打开libxml所在目录下的nanohttp.c,第1588行由 fd = open(filename, O_CREAT | O_WRONLY);更换为 fd = open(filename, O_CREAT | O_WRONLY,0777); 亲测,可行,重新make即可。