1. 程式人生 > >安裝pcre時出現configure: error: C compiler cannot create executables錯誤

安裝pcre時出現configure: error: C compiler cannot create executables錯誤

1、./configure時出現以下錯誤:C compiler cannot create executables

[[email protected] pcre-8.39]# ./configure 
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /bin/mkdir -p
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking whether make supports nested variables... yes
checking whether make supports nested variables... (cached) yes
checking for style of include used by make... GNU
checking for gcc... gcc
checking whether the C compiler works... no
configure: error: in `/opt/software/pcre-8.39':
configure: error: C compiler cannot create executables
See `config.log' for more details

2、於是檢視config.log檔案,發現開始報錯處:/usr/bin/ld: cannot find -lgcc_s

gcc: no input files
configure:3809: $? = 1
configure:3829: checking whether the C compiler works
configure:3851: gcc    conftest.c  >&5
/usr/bin/ld: skipping incompatible /usr/lib/gcc/x86_64-redhat-linux/4.4.7/libgcc_s.so when searching for -lgcc_s
/usr/bin/ld: skipping incompatible /usr/lib/gcc/x86_64-redhat-linux/4.4.7/libgcc_s.so when searching for -lgcc_s
/usr/bin/ld: cannot find -lgcc_s
collect2: ld returned 1 exit status
configure:3855: $? = 1
configure:3893: result: no
configure: failed program was:
| /* confdefs.h */
| #define PACKAGE_NAME "PCRE"
| #define PACKAGE_TARNAME "pcre"
| #define PACKAGE_VERSION "8.39"
| #define PACKAGE_STRING "PCRE 8.39"
| #define PACKAGE_BUGREPORT ""
| #define PACKAGE_URL ""
| #define PACKAGE "pcre"
| #define VERSION "8.39"
| /* end confdefs.h.  */
| 
| int
| main ()
| {
| 
|   ;
|   return 0;
| }
configure:3898: error: in `/opt/software/pcre-8.39':
configure:3900: error: C compiler cannot create executables
See `config.log' for more details

3、再上網找了找cannot find -lgcc_s這個錯誤,才知道是系統找不到需要連結的庫檔案(該庫檔案為libgcc_s.so)

  find / -name libgcc_s.so進行檔案查詢,發現gcc下有這個檔案

[[email protected] pcre-8.39]# find / -name libgcc_s.so
/opt/oracle/app/oracle/product/11.2.0/dbhome_1/lib/stubs/libgcc_s.so
/usr/lib/gcc/x86_64-redhat-linux/4.4.7/libgcc_s.so
/usr/lib/gcc/x86_64-redhat-linux/4.4.7/32/libgcc_s.so

但是vi編輯這個檔案才知道,是個空檔案,即libgcc_s.so是一個連結檔案,需要連結到對應目錄的libgcc_s.so.1檔案

於是find / -name libgcc_s.so1,在/usr/lib64/libgcc_s.so.1下(64位機)

[[email protected] pcre-8.39]# find / -name libgcc_s.so.1
/opt/oracle/app/oracle/product/11.2.0/dbhome_1/lib/stubs/libgcc_s.so.1
/root/libgcc_s.so.1
/lib/libgcc_s.so.1
/usr/lib/vmware-tools/lib32/libgcc_s.so.1
/usr/lib/vmware-tools/lib32/libgcc_s.so.1/libgcc_s.so.1
/usr/lib/vmware-tools/lib64/libgcc_s.so.1
/usr/lib/vmware-tools/lib64/libgcc_s.so.1/libgcc_s.so.1
/usr/lib64/libgcc_s.so.1
/lib64/libgcc_s.so.1 

知道問題了,那就好說了,新增libgcc_s.so連結

ln -sf /usr/lib64/libgcc_s.so.1  /usr/lib/gcc/x86_64-redhat-linux/4.4.7/libgcc_s.so

好了,再次./configure下,剛才的錯誤沒有了,問題解決

pcre-8.39 configuration summary:

    Install prefix .................. : /usr/local
    C preprocessor .................. : gcc -E
    C compiler ...................... : gcc
    C++ preprocessor ................ : g++ -E
    C++ compiler .................... : g++
    Linker .......................... : /usr/bin/ld -m elf_x86_64
    C preprocessor flags ............ : 
    C compiler flags ................ : -g -O2 -fvisibility=hidden
    C++ compiler flags .............. : -O2 -fvisibility=hidden -fvisibility-inlines-hidden
    Linker flags .................... : 
    Extra libraries ................. : 

    Build 8 bit pcre library ........ : yes
    Build 16 bit pcre library ....... : no
    Build 32 bit pcre library ....... : no
    Build C++ library ............... : yes
    Enable JIT compiling support .... : no
    Enable UTF-8/16/32 support ...... : no
    Unicode properties .............. : no
    Newline char/sequence ........... : lf
    \R matches only ANYCRLF ......... : no
    EBCDIC coding ................... : no
    EBCDIC code for NL .............. : n/a
    Rebuild char tables ............. : no
    Use stack recursion ............. : yes
    POSIX mem threshold ............. : 10
    Internal link size .............. : 2
    Nested parentheses limit ........ : 250
    Match limit ..................... : 10000000
    Match limit recursion ........... : MATCH_LIMIT
    Build shared libs ............... : yes
    Build static libs ............... : yes
    Use JIT in pcregrep ............. : no
    Buffer size for pcregrep ........ : 20480
    Link pcregrep with libz ......... : no
    Link pcregrep with libbz2 ....... : no
    Link pcretest with libedit ...... : no
    Link pcretest with libreadline .. : no
    Valgrind support ................ : no
    Code coverage ................... : no

相關推薦

安裝pcre出現configure: error: C compiler cannot create executables錯誤

1、./configure時出現以下錯誤:C compiler cannot create executables[[email protected] pcre-8.39]# ./configure checking for a BSD-compatible in

configure編譯出現 configure: error: C compiler cannot create executables錯誤解決

我們在編譯軟體的時候,是不是經常遇到下面的錯誤資訊呢? checking build system type... i686-pc-linux-gnu checking host system type... i686-pc-linux-gnu checking f

[PandoraBox SDK]交叉編譯libpcap提示configure: error: C compiler cannot create executables錯誤

環境:ArchLinux 原始碼:libpcap 下面開始編譯libpcap,先將toolchain和staging_dir加入環境變數中 [form@Felicity libpcap]$ export PATH=$PATH:/hom

解決configure: error: C++ compiler cannot create executables問題

./configure時報錯:configure: error: C++ compiler cannot create executables 。哎,今天重灌測試伺服器上的系統,設定好IP可以遠端訪問時就回來安裝軟體,在搭建PHP+Nginx環境時倒出現了問題。 問題出現在

protobuf編譯中遇到的c compiler cannot create executables錯誤解決方法

最近下載了最新的linux mint 16和ubuntu 12中分別嘗試編譯protobuf 2.5.0.但都是報c compiler cannot create executables的錯. 查過網上解決方案, 清一色都是export LIBS=之類的, 無法解決問題. 最終一個回帖啟發了我, 使用

編譯出現C compiler cannot create executables

Ubuntu14.04使用clang編譯Tengine時出現錯誤: make ... ... checking for gcc... clang checking whether the C compiler works... no configure: error: in

C compiler cannot create executables問題

今天在裝advancemame遊戲時遇到下面的問題,在網上搜索才知道是gcc沒有裝好,回想以前也有一些程式沒有裝好,是不是也是這個問題呢?於是試了一下以前一直沒有裝好的d4x,雖然現在熟悉了wget.雖然沒有裝上,不過情況有所好轉,跟以前報的錯誤不同了,應該是能

C compiler cannot create executables checking whether the C compiler works... no

checking for grep that handles long lines and -e… /bin/grep checking for egrep… /bin/grep -E checking for a sed that does not tru

nginx報錯:./configure: error: C compiler cc is not found, gcc 是已經安裝了的

x86 config bin share install 嘗試 found clas error: 源碼安裝nginx報錯,找不到gcc,但是實際上gcc是存在的,如下: # ./configure checking for OS + Linux 3.10.0

ubuntu apt 安裝軟體 出現(--configure)出錯解決辦法

好像是因為以前在更新系統時強制中斷的原因, 後來更新軟體經常卡在一個地方不動,然後報(–configure)時出錯。 sudo mv /var/lib/dpkg/info /var/lib/dpkg/info_old # 現將info資料夾更名 sudo mkdir /var/lib/d

“./configure: error: C compiler cc is not found”

gcc和c++裝完之後配置nginx的時候還會報cc找不到 錯誤:“./configure: error: C compiler cc is not found”  解決方法: CC=gcc expo

mysql執行帶外鍵的sql文件出現mysql ERROR 1215 (HY000): Cannot add foreign key constraint的解決

原因 name logs cin not 另一個 https mys power ERROR 1215 (HY000): Cannot add foreign key constraint 最近在建表時遇到了這個錯誤,然後找了下找到了解決辦法,記錄下: 本來

由SDK "iphoneos" cannot be located引起的C compiler cannot create executablesou問題

命令列錯誤資訊,如下圖 出現在Xcode 專案build的過程中,錯誤提示Xcode路徑定位錯誤,那就通過命令列重新指定Xcode路徑,網上有人說是安裝過多個Xcode版本的緣故 sudo xcode-select --switch /Applications

由SDK "iphoneos" cannot be located引起的C compiler cannot create executablesou問題

命令列錯誤資訊,如下圖 出現在Xcode 專案build的過程中,錯誤提示Xcode路徑定位錯誤,那就通過命令列重新指定Xcode路徑,網上有人說是安裝過多個Xcode版本的緣故 sudo xco

CentOS6.8中安裝Nginx出現 C compiler gcc is not found問題

已經按照好gcc之後還是會顯示 C compiler gcc is not found問題,嘗試了網上很多安裝gcc的方法都不可用。 1.原因分析: configure首先會編譯一個小測試程式,通過測試其執行結果來判斷編譯器是否能正常工作,由於交叉編譯器所編譯出的程式是無法在編譯主機上執

python安裝pymssql等包出現microsoft visual c++ 14.0 is required問題無需下載visualcppbuildtools的解決辦法

默認 出現 進入 scrip microsoft .whl install 忽略 我的電腦 如題,在練習python安裝一些包時,出現了microsoft visual c++ 14.0 is required問題。網上有很多資料:一是下載對應的.whl文件,然後pip i

安裝notedown出現"python setup.py egg_info" failed with error code 1 in /tmp/pip-req-build-By7yob/

notedown外掛可以開啟Markdown檔案,用起來很方便。可是最近在Python2.7+caffe2環境下安裝notedown的時候卻出現了很多問題。   1.  Python3.6 + notedown 對於Python3.0以上的版本,可以直接 使用下面

Hive安裝的時候元資料庫使用自己安裝的mysql出現SQL Error code: 1045

出現如下錯誤 Access denied for user 'root'@'localhost' (using password: YES) 如圖 通過在mysql中執行如下命令解決 GRANT ALL PRIVILEGES ON *.* TO 'root'@'local

在win7 64上用npm安裝phantomjs出現Error: UNABLE_TO_VERIFY_LEAF_SIGNATURE錯誤的解決方法。

解決方案在stackoverflow上找到的,關掉strict-ssl即可,如下: npm config set strict-ssl false 用完之後恢復: npm config set strict-ssl true http://stackoverflow

centos7.x下安裝pdo_mysql出現configure: error: mysql_query missing!?

今天升級了php5.4到php70w,通過php -m 檢視modules果然依賴的pdo_mysql不見了 於是重新編譯 安裝pdo_mysql時報錯configure: error: mysql_query missing!? 但是!搞了幾個小時還是沒任何進展後!我在centos下查看