Error while loading shared libraries: 'libpcre.so.0: cannot open shared object file: No such file or directory'

房东的猫 提交于 2019-11-27 05:17:43

问题


I just installed Passenger 3.0.11 and nginx and got this error:

Starting nginx: /opt/nginx/sbin/nginx: error while loading shared libraries: libpcre.so.0: cannot open shared object file: No such file or directory


回答1:


The message means what it says. The nginx executable was compiled to expect the PCRE (Perl-compatible Regular Expression) shared library to be available somewhere on LD_LIBRARY_PATH or specified in /etc/ld.so.conf or whatever equivalent library-locating mechanisms apply to your operating system, and it cannot find the library.

You will need to install PCRE - or configure your environment so that nginx will look for the PCRE library where it is installed.




回答2:


I got the same error, and I fixed the problem by running sudo ldconfig.




回答3:


Execute below command and restart server again.

export LD_LIBRARY_PATH=/usr/local/lib:$LD_LIBRARY_PATH



回答4:


There are few recommendations, with this I have solved the issue which I had.

  • As mentioned above add the lib path in the /etc/ld.so.conf and check the same is updated or not by using ldconfig -v
  • Add the LD_LIBRARY_PATH in the .bash_profile and refresh the same with . . bash profile.
  • If the lib file is not get updated then use the updatedb to refresh the library list.



回答5:


just reinstall h5py conda, solved for me



来源:https://stackoverflow.com/questions/8501163/error-while-loading-shared-libraries-libpcre-so-0-cannot-open-shared-object-f

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!