首页 > 其他 > 详细

nginx的环境配置的问题

时间:2016-08-23 12:53:27      阅读:331      评论:0      收藏:0      [点我收藏+]

在安装好nginx之后,运行nginx,报错:

nginx

dyld: Library not loaded: /usr/local/lib/libpcre.1.dylib

Referenced from: /usr/local/bin/nginx

Reason: image not found

我们可以通过brew doctor来查看具体的出现的问题。

 

brew doctor

 

结果得到如下信息:

Warning: You have unlinked kegs in your Cellar
Leaving kegs unlinked can lead to build-trouble and cause brews that depend on
those kegs to fail to run properly once built. Run `brew link` on these:

    pcre

然后执行:

brew link

之后又出现错误的提示如下:

brew link pcre
Linking /usr/local/Cellar/pcre/8.36... 
Error: Could not symlink share/man/man3/pcre.3
/usr/local/share/man/man3 is not writable.

最后在网上找到如下解决方案:

sudo chown -R 用户名 /usr/local/share/man/man3

接下来,在link操作就可以啦:

brew link pcre  

哈哈,这样就可以成功运行nginx啦。

可以通过localhost:8080进行查看。

结果如下:

技术分享

 

nginx的环境配置的问题

原文:http://www.cnblogs.com/xiaohaillong/p/5798629.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!