在Linode Ubuntu 14.04 64位系统中安装AMH碰到的问题及解决办法

刚买了个Linode的VPS,尝试安装AMH,碰到以下两个问题导致安装失败:

1,

gcc -DHAVE_CONFIG_H -DEXEEXT=\"\" -I. -I.. -I../lib -I../intl -DDEPENDS_ON_LIBICONV=1 -DDEPENDS_ON_LIBINTL=1 -g -O2 -c progname.c

In file included from progname.c:26:0:

./stdio.h:1010:1: error: ‘gets’ undeclared here (not in a function)

_GL_WARN_ON_USE (gets, "gets is a security hole - use fgets instead");

^

make[2]: * [progname.o] Error 1

make[2]: Leaving directory `/home/amh_install/packages/untar/libiconv-1.14/srclib'

这个问题已经有解决办法;[http://amysql.com/bbs/forum.php?mod=viewthread&tid=2610](http://amysql.com/bbs/forum.php?mod=viewthread&tid=2610)

more

2,

checking for png_write_image in -lpng… yes

If configure fails try –with-xpm-dir=<DIR>

configure: error: freetype.h not found.

make: * No targets specified and no makefile found. Stop.

make: * No rule to make target `install'. Stop.

cp: cannot create regular file ‘/usr/local/php/etc/php-fpm.conf’: No such file or directory

cp: cannot create regular file ‘/usr/local/php/etc/php-fpm-template.conf’: No such file or diorytt

mkdir: cannot create directory ‘/usr/local/php/etc/fpm’: No such file or directory

mkdir: cannot create directory ‘/usr/local/php/var/run/pid’: No such file or directory

touch: cannot touch ‘/usr/local/php/etc/fpm/amh.conf’: No such file or directory

./amh.sh: line 371: /usr/local/php/sbin/php-fpm: No such file or directory

[OK] php-5.3.27 install completed.

查看vi php-5.3.27/configure

for i in $PHP_FREETYPE_DIR /usr/local /usr; do

if test -f &quot;$i/include/freetype2/freetype/freetype.h&quot;; then

  FREETYPE2_DIR=$i

  FREETYPE2_INC_DIR=$i/include/freetype2

  break

fi

done

可以看到脚本假定freetype的相对路径为&ldquo;/include/freetype2/freetype/freetype.h&rdquo;,但实际上系统路径为&ldquo;/include/freetype2/freetype.h&rdquo;。可以相应的修改脚本,去除一层&quot;freetype&quot;,或者在系统路径下临时多生成一层路径,并将相应的文件复制过去