Linux安装遇到的问题
来自:http://blog.sina.com.cn/s/blog_53b95aec0100xvwf.html
1.当编译的时候,出现如下错误
configure: error: no acceptable C compiler found in $PATH
解答:
安装GCC软件套件
yum install gcc
-----------------------------------------------------
2.当编译的时候,出现如下错误
checking for C++ compiler default output file name... configure: error: C++ compiler cannot create executables
See `config.log' for more details.
解答:
yum install gcc gcc-c++ kernel-devel
------------------------------------------------------
3. rpm包安装时候出现
error: Failed dependencies:
freetype = 2.2.1-28.el5_5 is needed by freetype-devel-2.2.1-28.el5_5.x86_64
zlib-devel is needed by freetype-devel-2.2.1-28.el5_5.x86_64
解答:
rpm -ivh --nodeps freetype-devel-2.2.1-28.el5_5.x86_64.rpm
需要先安装相关的软件包,这都有依赖性。如果,你只想安装gcc-4.1.2-46.SEL5_4.2.i386的软件包的话,就多加一个 --nodeps 的参数
-----------------------------------------------------
4.编译安装php出现的错误总汇
http://wenku.baidu.com/view/eb6307da7f1922791688e879.html
http://ftp.ntu.edu.tw/gnu/autoconf/
-----------------------------------------------------
5.error while loading shared libraries: libiconv.so.2: cannot open shared object file: No such file or directory
解答:
在安装一个软件包时,最后输入sudo make install命令后,出现以下错误信息:
error while loading shared libraries: libiconv.so.2: cannot open shared object file: No such file or directory
但是在/usr/local/lib下却能找到libiconv.so.2,解决方法是将/usr/local/lib路径添加到/etc/ld.so.conf文件中,然后用sudo ldconfig命令加载,再重新输入sudo make install命令就可以了
------------------------------------------------------
6.保证./buildconf --force正常运行
解答:
安装autoconf-2.13.tar.gz 保证./buildconf --force正常运行
./configure
make
make install
安装xml2 yum install libxml2.x86_64 libxml2-devel.x86_64
----------------------------------------------------------
7. cp: cannot stat `ext/phar/phar.phar': No such file or directory
出现了cp: cannot stat `ext/phar/phar.phar': No such file or directory
解答:
于是我又: cd ext/phar/
ls -l
结果发现没有phar.phar 这个文件!!于是我怀疑是phar.php ,
cp ./phar.php ./phar.phar
make install
-------------------------------------------------------------
8.安装PDO_MYsql时候,出现configure: error: mysql_query missing!?
解答:
cd POD_MYSQL
/usr/local/php/bin/phpize
./configure --with-php-config=/usr/local/php/bin/php-config --with-pdo-mysql=/usr/local/mysql
make
make install
-----------------------------------------------------
9.安装 ncurses-devel ncurses
checking for tgetent in -ltermcap… no
checking for termcap functions library… configure: error: No curses/termcap library found
解答:
yum install ncurses-devel ncurses
------------------------------------------------------
10. 插件错误
./BUILD/autorun.sh: line 23: aclocal: command not found
Can't execute aclocal
解答:
yum install imake automake libtool
-------------------------------------------------------
11.configure: error:unknown plugin: sphinx
解答:
是因为mysql源码安装的时候,没有执行编译安装
执行即可 sh ./BUILD/autorun.sh