简体   繁体   English

安装了基于APR的Apache Tomcat Native库的不兼容版本1.1.12,而Tomcat需要1.1.17版本

[英]An incompatible version 1.1.12 of the APR based Apache Tomcat Native library is installed, while Tomcat requires version 1.1.17

I downloaded Apache Tomcat 7.x. 我下载了Apache Tomcat 7.x. When I add this Tomcat in Eclipse I get this error: 当我在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

How can I solve this problem? 我怎么解决这个问题?

When I open the localhost:8080/manager/html it shows the following error: 当我打开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

The first error certainly sounds like a version mismatch. 第一个错误肯定听起来像版本不匹配。 The APR library is a library linked in at runtime based on your path (which itself can be based on where you execute Tomcat from). APR库是一个在运行时根据您的路径链接的库(它本身可以基于您执行Tomcat的位置)。 It sounds like you have the APR library for Tomcat 6. It's possible that Eclipse is providing this APR library. 听起来你有Tomcat 6的APR库.Eclipse有可能提供这个APR库。

Tomcat ships with an APR library but in order to ease installation Tomcat doesn't automatically modify the path to point at the APR library. Tomcat附带一个APR库,但为了简化安装,Tomcat不会自动修改指向APR库的路径。 The Eclipse Tomcat integration may (I'm not sure on this one, haven't used the integration before) include the APR libraries to make it easier to use Tomcat. Eclipse Tomcat集成可能(我不确定这个,之前没有使用过集成)包含APR库,以便更容易使用Tomcat。

Check and make sure that Eclipse isn't configured to use an earlier version of Tomcat and if it is, either upgrade Eclipse to Tomcat 7 or downgrade Tomcat to the version specified in Eclipse. 检查并确保Eclipse未配置为使用早期版本的Tomcat,如果是,则将Eclipse升级到Tomcat 7或将Tomcat降级到Eclipse中指定的版本。

If you can't figure it out then you don't necessarily have to worry about it at the moment. 如果你无法弄清楚,那么你现在不必担心它。 Tomcat should work anyways without the APR libraries. 没有APR库,Tomcat应该可以工作。 The only benefit you will get from the APR libraries is increased performance and since this is probably the start of your project that doesn't have to be worked out right away. 您将从APR库中获得的唯一好处是提高性能,因为这可能是您的项目的开始,不必立即解决。

The second issue, the /manager/ page, could be Tomcat configuration. 第二个问题,/ manager / page,可能是Tomcat配置。 Tomcat won't actually display the manager page (and it will give you that error) unless users have been configured with manager permissions . 除非已经为用户配置了管理员权限,否则Tomcat实际上不会显示管理器页面(并且会给出该错误)。

Try going to just / (ie http://localhost:8080 ), that page should load regardless of user configuration. 尝试转到/(即http:// localhost:8080 ),无论用户配置如何,都应该加载该页面。

In my case I had inadvertently installed the APR library when I install once Tomcat locally on my Linux using the package manager. 在我的情况下,当我使用包管理器在Linux上本地安装Tomcat时,我无意中安装了APR库。 On Debian/Ubuntu this installed the APR package for a different Tomcat version (the one bundled with your distribution) which caused this error. 在Debian / Ubuntu上,这为不同的Tomcat版本(与您的发行版捆绑在一起)安装了APR包,这导致了这个错误。

After simply 简单地说

sudo apt-get purge libtcnative-1

The error was gone. 错误消失了。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM