天天看點

問題 - ./Configure darwin64-x86_64-cc

文章目錄

      • 關鍵錯誤資訊
      • 錯誤原因
      • 解決方法

關鍵錯誤資訊

WARNING! If you wish to build 64-bit library, then you have to

         invoke './Configure darwin64-x86_64-cc' *manually*.

         You have about 5 seconds to press Ctrl-C to abort.
           
ld: symbol(s) not found for architecture x86_64
collect2: ld returned 1 exit status
make[1]: *** [objs/nginx] Error 1
make: *** [build] Error 2
           

錯誤原因

  這個問題應該是

openssl/config

腳本猜對你的系統是64位,但是會根據

$KERNEL_BITS

來判斷是否開啟 x86_64 編譯,預設是不開啟的(很奇怪的設定,雖然會給你5秒時間停止編譯并手動開啟),是以你生成的 openssl 庫檔案是 32 位的,最後靜态連結到 nginx 會出錯。

解決方法

# 編譯之前先設定一下變量
export KERNEL_BITS=64
           

  我這邊使用的是 macOS High Sierra 10.13.6,其他 OS 未測試

繼續閱讀