LINUX.ORG.RU
ФорумAdmin

Как добавить LIBDIR to `/etc/ld.so.conf' ?

 , ,


1

1

Суть проблемы: tomcat нужны native libs.

окт 19, 2014 4:41:44 PM org.apache.catalina.core.AprLifecycleListener init
INFO: The APR based Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: /home/andrei/idea-IU-135.1230/bin::/usr/java/packages/lib/amd64:/usr/lib64:/lib64:/lib:/usr/lib

Установил tomcat-native libs в /usr/local/apr/lib, но tomcat их не видит.

После установки библиотек terminal пишет:

Libraries have been installed in:
   /usr/local/apr/lib

If you ever happen to want to link against installed libraries
in a given directory, LIBDIR, you must either use libtool, and
specify the full pathname of the library, or use the `-LLIBDIR'
flag during linking and do at least one of the following:
   - add LIBDIR to the `LD_LIBRARY_PATH' environment variable
     during execution
   - add LIBDIR to the `LD_RUN_PATH' environment variable
     during linking
   - use the `-Wl,-rpath -Wl,LIBDIR' linker flag
   - have your system administrator add LIBDIR to `/etc/ld.so.conf'

See any operating system documentation about shared libraries for
more information, such as the ld(1) and ld.so(8) manual pages.
как правильно добавить путь к библиотекам через /etc/ld.so.conf ?

Если у вас есть такой файл и там список каталогов, то добавляете в него строку ″/usr/local/apr/lib″. Если у вас есть каталог ″/etc/ld.so.conf.d″, то создаёте там файл, особо не важно с каким именем, содержащий эту же строчку.

Потом в любом разе делаете команду ″ldconfig″.

mky ★★★★★ ()
Последнее исправление: mky (всего исправлений: 1)
Ответ на: комментарий от mky

Директория ″/etc/ld.so.conf.d″ открыл файл libc.conf там

# libc default configuration
/usr/local/lib

добавил строку /usr/local/apr/lib

# libc default configuration
/usr/local/apr/lib
/usr/local/lib

сделал ldconfig

tomcat не видит библиотек. Что делать?

Andreu ()
Ответ на: комментарий от mky
19-Oct-2014 18:57:35.230 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Server version: Apache Tomcat/8.0.14
19-Oct-2014 18:57:35.232 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Server built:   Sep 24 2014 09:01:51
19-Oct-2014 18:57:35.232 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Server number:  8.0.14.0
19-Oct-2014 18:57:35.232 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log OS Name:        Linux
19-Oct-2014 18:57:35.232 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log OS Version:     3.13.0-37-generic
19-Oct-2014 18:57:35.232 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Architecture:   amd64
19-Oct-2014 18:57:35.233 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log JVM Version:    1.8.0_25-b17
19-Oct-2014 18:57:35.233 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log JVM Vendor:     Oracle Corporation
19-Oct-2014 18:57:35.410 INFO [main] org.apache.catalina.core.AprLifecycleListener.init The APR based Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: /home/andrei/idea-IU-135.1230/bin::/usr/java/packages/lib/amd64:/usr/lib64:/lib64:/lib:/usr/lib
19-Oct-2014 18:57:35.649 INFO [main] org.apache.coyote.AbstractProtocol.init Initializing ProtocolHandler ["http-nio-8080"]
19-Oct-2014 18:57:35.663 INFO [main] org.apache.tomcat.util.net.NioSelectorPool.getSharedSelector Using a shared selector for servlet write/read
19-Oct-2014 18:57:35.666 INFO [main] org.apache.coyote.AbstractProtocol.init Initializing ProtocolHandler ["ajp-nio-8009"]
19-Oct-2014 18:57:35.668 INFO [main] org.apache.tomcat.util.net.NioSelectorPool.getSharedSelector Using a shared selector for servlet write/read
19-Oct-2014 18:57:35.668 INFO [main] org.apache.catalina.startup.Catalina.load Initialization processed in 520 ms
19-Oct-2014 18:57:35.689 INFO [main] org.apache.catalina.core.StandardService.startInternal Starting service Catalina
19-Oct-2014 18:57:35.689 INFO [main] org.apache.catalina.core.StandardEngine.startInternal Starting Servlet Engine: Apache Tomcat/8.0.14
19-Oct-2014 18:57:35.695 INFO [main] org.apache.coyote.AbstractProtocol.start Starting ProtocolHandler ["http-nio-8080"]
19-Oct-2014 18:57:35.700 INFO [main] org.apache.coyote.AbstractProtocol.start Starting ProtocolHandler ["ajp-nio-8009"]
19-Oct-2014 18:57:35.701 INFO [main] org.apache.catalina.startup.Catalina.start Server startup in 32 ms
19-Oct-2014 18:57:45.700 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDirectory Deploying web application directory /opt/tomcat8/webapps/manager
19-Oct-2014 18:57:45.736 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDirectory Deployment of web application directory /opt/tomcat8/webapps/manager has finished in 35 ms
Andreu ()
Ответ на: комментарий от Andreu

Ну сделайте на эту либу (если она установлена) симлинк:

ln -s /usr/local/apr/lib/libtcnative-1.so /usr/lib/libtcnative-1.so

mky ★★★★★ ()
Вы не можете добавлять комментарии в эту тему. Тема перемещена в архив.