![](/img/trans.png)
[英]Tomcat ans APR lib : requires the APR/native library which is not available
[英]An incompatible version 1.1.12 of the APR based Apache Tomcat Native library is installed, while Tomcat requires version 1.1.17
我下載了Apache Tomcat 7.x. 當我在Eclipse中添加這個Tomcat時,我收到此錯誤:
Jan 25, 2011 3:21:05 PM org.apache.catalina.core.AprLifecycleListener init
SEVERE: An incompatible version 1.1.12 of the APR based Apache Tomcat Native library is installed, while Tomcat requires version 1.1.17
Jan 25, 2011 3:21:05 PM org.apache.catalina.core.AprLifecycleListener init
SEVERE: An incompatible version 1.1.12 of the APR based Apache Tomcat Native library is installed, while Tomcat requires version 1.1.17
Jan 25, 2011 3:21:05 PM org.apache.catalina.core.AprLifecycleListener init
SEVERE: An incompatible version 1.1.12 of the APR based Apache Tomcat Native library is installed, while Tomcat requires version 1.1.17
Jan 25, 2011 3:21:05 PM org.apache.catalina.core.AprLifecycleListener init
SEVERE: An incompatible version 1.1.12 of the APR based Apache Tomcat Native library is installed, while Tomcat requires version 1.1.17
Jan 25, 2011 3:21:05 PM org.apache.catalina.core.AprLifecycleListener init
SEVERE: An incompatible version 1.1.12 of the APR based Apache Tomcat Native library is installed, while Tomcat requires version 1.1.17
Jan 25, 2011 3:21:08 PM org.apache.coyote.AbstractProtocolHandler init
INFO: Initializing ProtocolHandler ["http-bio-8080"]
Jan 25, 2011 3:21:08 PM org.apache.coyote.AbstractProtocolHandler init
INFO: Initializing ProtocolHandler ["ajp-bio-8009"]
Jan 25, 2011 3:21:08 PM org.apache.catalina.startup.Catalina load
INFO: Initialization processed in 3054 ms
Jan 25, 2011 3:21:08 PM org.apache.catalina.core.StandardService startInternal
INFO: Starting service Catalina
Jan 25, 2011 3:21:08 PM org.apache.catalina.core.StandardEngine startInternal
INFO: Starting Servlet Engine: Apache Tomcat/7.0.6
Jan 25, 2011 3:21:08 PM org.apache.coyote.AbstractProtocolHandler start
INFO: Starting ProtocolHandler ["http-bio-8080"]
Jan 25, 2011 3:21:08 PM org.apache.coyote.AbstractProtocolHandler start
INFO: Starting ProtocolHandler ["ajp-bio-8009"]
Jan 25, 2011 3:21:08 PM org.apache.catalina.startup.Catalina start
INFO: Server startup in 251 ms
我怎么解決這個問題?
當我打開localhost:8080/manager/html
它顯示以下錯誤:
HTTP Status 404 - /manager/html
type Status report
message /manager/html
description The requested resource (/manager/html) is not available.
Apache Tomcat/7.0.6
第一個錯誤肯定聽起來像版本不匹配。 APR庫是一個在運行時根據您的路徑鏈接的庫(它本身可以基於您執行Tomcat的位置)。 聽起來你有Tomcat 6的APR庫.Eclipse有可能提供這個APR庫。
Tomcat附帶一個APR庫,但為了簡化安裝,Tomcat不會自動修改指向APR庫的路徑。 Eclipse Tomcat集成可能(我不確定這個,之前沒有使用過集成)包含APR庫,以便更容易使用Tomcat。
檢查並確保Eclipse未配置為使用早期版本的Tomcat,如果是,則將Eclipse升級到Tomcat 7或將Tomcat降級到Eclipse中指定的版本。
如果你無法弄清楚,那么你現在不必擔心它。 沒有APR庫,Tomcat應該可以工作。 您將從APR庫中獲得的唯一好處是提高性能,因為這可能是您的項目的開始,不必立即解決。
第二個問題,/ manager / page,可能是Tomcat配置。 除非已經為用戶配置了管理員權限,否則Tomcat實際上不會顯示管理器頁面(並且會給出該錯誤)。
嘗試轉到/(即http:// localhost:8080 ),無論用戶配置如何,都應該加載該頁面。
在我的情況下,當我使用包管理器在Linux上本地安裝Tomcat時,我無意中安裝了APR庫。 在Debian / Ubuntu上,這為不同的Tomcat版本(與您的發行版捆綁在一起)安裝了APR包,這導致了這個錯誤。
簡單地說
sudo apt-get purge libtcnative-1
錯誤消失了。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.