LAMP環(huán)境搭建
LAMP環(huán)境搭建詳解
安裝過(guò)程中出現(xiàn)的問(wèn)題 :
1、使用源碼編譯的方法安裝MySQL時(shí)報(bào)錯(cuò):
當(dāng)設(shè)置完./configure后,提示
- checking for termcap functions library… configure: error: No curses/termcap library found
后退出。
解決辦法:
網(wǎng)上大多數(shù)人都是認(rèn)為缺少ncurses,于是剛開(kāi)始我先裝的是ncurses。
ncurses-devel.***.rpm 包解決
或者去下載一個(gè)ncurses-5.6.tar.gz,
然后再重新編譯Mysql進(jìn)行安裝。
但是在MySQL中configure時(shí)還是提示如上錯(cuò)誤,網(wǎng)上還提出了一種原因:缺少ncurses-devel,于是又從centos(我安裝的是centos5.5)安裝文件中找到ncurses-devel的rpm文件,
rpm -ivh ncurses-devel-5.5-24.20060715.i386.rpm
裝完后,在MySQL下進(jìn)行configure設(shè)置正常,問(wèn)題解決。
2、編譯gd-2.0.35.tar.gz時(shí)報(bào)錯(cuò):
gcc -DHAVE_CONFIG_H -I. -I. -I. -I/usr/local/freetype/include/freetype2 -I/usr/local/freetype/include -I/usr/local/freetype/include -I/usr/local/jpeg/include -g -O2 -MT gd_png.lo -MD -MP -MF .deps/gd_png.Tpo -c gd_png.c -fPIC -DPIC -o .libs/gd_png.o
gd_png.c:16:53: error: png.h: No such file or directory
gd_png.c:47: error: expected specifier-qualifier-list before ‘jmp_buf’
gd_png.c:54: error: expected ‘)’ before ‘png_ptr’
gd_png.c:82: error: expected ‘)’ before ‘png_ptr’
gd_png.c:92: error: expected ‘)’ before ‘png_ptr’
解決辦法:
vi gd_png.c
將
- #include “png.h” /* includes zlib.h and setjmp.h */
替換成:
- #include “/usr/local/libpng/include/png.h” /* includes zlib.h and setjmp.h */
然后再make就可以了
3、configure libpng時(shí)出錯(cuò):
- checking for zlibVersion in -lz… no
- configure: error: zlib not installed
提示沒(méi)有安裝zlib,但其實(shí)我在安裝libpng之前安裝就是zlib。
網(wǎng)上說(shuō)有一種解決辦法是回到zlib目錄執(zhí)行make clean后重新配置安裝,但失敗。
還有一種是,回到zlib目錄執(zhí)行make clean命令,然后依次執(zhí)行./configure、make、make install,其中configure時(shí)不要設(shè)置–prefix的值。然后回來(lái)配置libpng,成功(沒(méi)有刪除前一次在配置zlib時(shí)創(chuàng)建的目錄/usr/local/zlib,不知道以后會(huì)不會(huì)產(chǎn)生影響)。解決。
【編輯推薦】