- 安装zlib低版本以后,安装freetype等时make报错
/usr/local/lib/libz.a(inflate.o): relocation R_X86_64_32S against 'zcfree' can not be used when making a shared object; recompile with -fPIC
/usr/bin/ld: /usr/local/lib/libz.a(crc32.o): relocation R_X86_64_32 against .rodata' can not be used when making a shared object; recompile with -fPIC
暂时解决办法:
cd /usr/local/lib/
cp libz.a libz.a.bak
vim libz.a
底行模式下输出/zcfree 在所有zcfree字段后面添加-fPIC,wq保存退出后再次执行make
安装成功后不要忘记将备份恢复,否则后面其他一些软件安装会出现报错
!!!!其余类似gd库以及jpeg,png如若报类似错误,也可以才采用上述办法,但最好还是更换zlib版本
解决办法: 更换zlib版本
-
php编译问题
Problem with libpng.(a|so) or libz.(a|so). Please check config.log for more information.
Unable to find libgd.(a|so) >= 2.1.0 anywhere under /usr/local/gd2/
出现上述问题,先检查./configure后面的参数的路径是否写正确,然后安装相应的devel包,如若还是不能解决,则删除点后面的路径,例
--with-gd=/usr/local/gd/ 修改为=> --with-gd -
mysql出现问题:
configure: error:" wrongMySQL library version or lib not found. Check config.log for more information."
在mysqli的路径中删除路径只保留 --with-mysqli
PDO_MYSQL configure failed, MySQL 4.1 needed. Please check config.log for more information.
将-with-pdo-mysql后面的路径删除
出现其他类似控件安装失败,可以直接删除后面的路径 -
安装freetype时make install报错
rmdir: 删除 "/usr/local/freetype//include/freetype2/freetype/internal" 失败: 没有那个文件或目录
make: [install] 错误 1 (忽略)
解决办法 mkdir -p /usr/local/freetype//include/freetype2/freetype/internal
- 安装低版本jpeg6报错
[root@bogon jpeg-6b]# make; make install
./libtool --mode=compile gcc -O2 -I. -c ./jcapimin.c
make: ./libtool:命令未找到
make: *** [jcapimin.lo] 错误 127
./libtool --mode=compile gcc -O2 -I. -c ./cjpeg.c
make: ./libtool:命令未找到
make: *** [cjpeg.lo] 错误 127
解决办法:
首先看有没有安装libtool 及 libtool-ltdl-devel
rpm -qa | grep libtool
然后进入jpeg-6b的源码目录,然后执行以下步骤,切记!COPY到当前目录注意后面的点(.)
cp /usr/share/libtool/config/config.sub .
cp /usr/share/libtool/config/config.guess .
也就是把 libtool里面的两个配置文件拿来覆盖掉jpeg-6b目录下的对应文件
make clean 再重新configure
没有权限的时候先建立对应的文件夹,再次make install就行了
- mysql5.7 安装完成以后mysqld_safe启动后无法进行密码设置,找不到临时密码
解决办法:
shell >>ps -aux | grep mysqld
shell >>kill -9 (进程号)
查看mysqld进程并杀死
shell >>./mysqld_safe --skip-grant-tables --skip-networking &
另以免密码登录的方式启动mysqld_safe,&是将他放入后台执行
mysql >>USE mysql;
mysql >>UPDATE user SET authentication_string=PASSWORD('newpassword') where USER='root';
其中authentication_string是新的用户密码字段,之前为password,后面的PASSWORD是mysql的一个加密函数,后面newpassword改为你修改后的密码
网友评论