error

  1. 安裝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版本

  1. 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

  2. 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后面的路徑刪除
    出現其他類似控件安裝失敗,可以直接刪除后面的路徑

  3. 安裝freetype時make install報錯
    rmdir: 刪除 "/usr/local/freetype//include/freetype2/freetype/internal" 失敗: 沒有那個文件或目錄
    make: [install] 錯誤 1 (忽略)

解決辦法 mkdir -p /usr/local/freetype//include/freetype2/freetype/internal

  1. 安裝低版本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就行了

  1. 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改為你修改后的密碼

最后編輯于
?著作權歸作者所有,轉載或內容合作請聯系作者
平臺聲明:文章內容(如有圖片或視頻亦包括在內)由作者上傳并發布,文章內容僅代表作者本人觀點,簡書系信息發布平臺,僅提供信息存儲服務。

推薦閱讀更多精彩內容