2012-05-19 102 views
32

當在Ubuntu 11.10安裝Apache,我得到以下錯誤:Apache安裝; libpcre錯誤

configure: error: APR not found. Please read the documentation.

我跟着指示here,然後,我得到的錯誤如下:

configure: error: pcre-config for libpcre not found. PCRE is required and available from http://pcre.org/

我在做什麼錯我該如何解決它?

回答

79

1.從PCRE.org

2. PCRE有前綴編譯並安裝它:

./configure --prefix=/usr/local/pcre 
make 
make install 

3.回去的地方,你的Apache安裝和使用PCRE編譯Apache:

--with-pcre=/usr/local/pcre 
+26

我必須明確指定pcre配置位置,如'./在CentOS 6.3中配置--with-pcre =/usr/local/pcre/pcre-config –

+0

httpd make過程是否與PCRE靜態鏈接?或者我需要包括他們與編譯的httpd的東西,如果我打它並分享它? – nterry

+3

同樣在這裏,我需要說明RHEL 5文件的完整路徑名:--with-pcre =/usr/local/bin/pcre-cofnig – Eric

17

對我來說(Fedora Linux),只需安裝pcre-devel:yum install -y pcre-devel即可。之後甚至不需要使用--with-pcre

+4

這也是我在Ubuntu所需要的。做'sudo apt-get install libpcre3-dev'(或者,你知道,在你的時間裏有哪些軟件包/版本,Future Boy),然後返回並嘗試在'./configure'上得到錯誤的相同選項本來。現在應該工作。 – daemonaka

+0

對於RedHat 6也適用。 – Halmackenreuter

1

RHEL 3沒有必要設置參數--with-pcre指向pcre-config。只需要pcre路徑

我的configure命令:

./configure --prefix=/usr/local/apache2 --with-pcre=/usr/local/pcre 
+1

我刪除了引號,並得到這個工作。 –

+0

謝謝,我只是刪除引號(「)在前綴參數 – albertoiNET

2

我是其他問題的Apache2編譯在CentOS的與PCRE。我安裝在其他位置「/自定義/位置/ PCRE」 PCRE和配置命令拋出以下錯誤

configure: error: Did not find pcre-config script at "/custom/location/pcre" 

來解決它改變的標誌--with-pcre=/custom/location/pcre--with-pcre=/custom/location/pcre/bin/pcre2-config

+0

我有完全相同的問題,並使用./configure --with-included-apr --with-pcre =/usr/local/pcre/bin/pcre2-config爲我解決了它 - 想知道爲什麼這是downvoted! –

0

這爲我工作

。/configure --prefix/u01/apache --with-included-apr --with-pcre =/usr/local/pcre/bin/pcre2-config