gpt4 book ai didi

ubuntu - ubuntu 上安装 nginx

转载 作者:行者123 更新时间:2023-12-04 18:27:38 24 4
gpt4 key购买 nike

我正在尝试在 ubuntu 机器上安装 nginx。ubuntu - 12.04 精确内核 - 3.2.0海湾合作委员会-4.6.3sudo apt-get install gcc automake autoconf libssl-dev libreadline-dev

编译nginx出现以下错误:

gcc -c -pipe  -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Werror -g -Wno-error  -I src/core -I src/event -I src/event/modules -I src/os/unix -I /opt/ruby-enterprise-1.8.7-2012.02/lib/ruby/gems/1.8/gems/passenger-4.0.29/ext -I /tmp/passenger.33e81r/pcre-8.32 -I objs -I src/http -I src/http/modules -I src/mail \
-o objs/addon/nginx/ContentHandler.o \
/opt/ruby-enterprise-1.8.7-2012.02/lib/ruby/gems/1.8/gems/passenger-4.0.29/ext/nginx/ContentHandler.c
make[1]: Leaving directory `/vagrant_data/clsi-chef/nginx-1.2.6'
--------------------------------------------

[1m[31mIt looks like something went wrong[0m[37m[40m

Please read our Users guide for troubleshooting tips:

[1m/opt/ruby-enterprise-1.8.7-2012.02/lib/ruby/gems/1.8/gems/passenger-4.0.29/doc/Users guide Nginx.html[0m[37m[40m
[1mhttp://www.modrails.com/documentation/Users%20guide%20Nginx.html[0m[37m[40m

If that doesn't help, please use our support facilities. We'll do our best to help you.

[1mhttp://www.phusionpassenger.com/support[0m[37m[40m
[0m
STDERR: rm -rf buildout/cache
rm -rf buildout/common/libboost_oxt.a buildout/common/libboost_oxt
rm -f buildout/common/libpassenger_common/agents/LoggingAgent/FilterSupport.o
rm -f buildout/common/libpassenger_common/Logging.o buildout/common/libpassenger_common/Exceptions.o buildout/common/libpassenger_common/Utils/SystemTime.o buildout/common/libpassenger_common/Utils/StrIntUtils.o buildout/common/libpassenger_common/Utils/IOUtils.o buildout/common/libpassenger_common/Utils.o
rm -f buildout/common/libpassenger_common/Utils/Base64.o buildout/common/libpassenger_common/Utils/CachedFileStat.o buildout/common/libpassenger_common/Utils/LargeFiles.o buildout/common/libpassenger_common/ApplicationPool2/Implementation.o buildout/common/libpassenger_common/ApplicationPool2/AppTypes.o buildout/common/libpassenger_common/AgentsStarter.o buildout/common/libpassenger_common/AgentsBase.o buildout/common/libpassenger_common/Utils/MD5.o buildout/common/libpassenger_common/Utils/fib.o buildout/common/libpassenger_common/Utils/jsoncpp.o
rm -rf buildout/common/libpassenger_common
rm -rf buildout/agents/
mkdir -p buildout/common/libboost_oxt/boost
mkdir -p buildout/common/libboost_oxt/oxt
mkdir -p buildout/common/libboost_oxt
rm -rf buildout/common/libboost_oxt.a
ar cru buildout/common/libboost_oxt.a buildout/common/libboost_oxt/boost/lockpool.o buildout/common/libboost_oxt/boost/wc_regex_traits.o buildout/common/libboost_oxt/boost/regex_raw_buffer.o buildout/common/libboost_oxt/boost/posix_api.o buildout/common/libboost_oxt/boost/regex_traits_defaults.o buildout/common/libboost_oxt/boost/static_mutex.o buildout/common/libboost_oxt/boost/cpp_regex_traits.o buildout/common/libboost_oxt/boost/winstances.o buildout/common/libboost_oxt/boost/cregex.o buildout/common/libboost_oxt/boost/c_regex_traits.o buildout/common/libboost_oxt/boost/regex.o buildout/common/libboost_oxt/boost/regex_debug.o buildout/common/libboost_oxt/boost/instances.o buildout/common/libboost_oxt/boost/wide_posix_api.o buildout/common/libboost_oxt/boost/future.o buildout/common/libboost_oxt/boost/tss_null.o buildout/common/libboost_oxt/boost/once.o buildout/common/libboost_oxt/boost/once_atomic.o buildout/common/libboost_oxt/boost/thread.o buildout/common/libboost_oxt/boost/error_code.o buildout/common/libboost_oxt/oxt/implementation.o buildout/common/libboost_oxt/oxt/system_calls.o
ranlib buildout/common/libboost_oxt.a
mkdir -p buildout/common/libpassenger_common/Utils
mkdir -p buildout/common/libpassenger_common/ApplicationPool2
ext/common/Utils/jsoncpp.cpp: In member function 'bool Json::Reader::decodeNumber(Json::Reader::Token&)':
ext/common/Utils/jsoncpp.cpp:766:4: warning: comparison of unsigned expression >= 0 is always true [-Wtype-limits]
ext/common/Utils/jsoncpp.cpp: In copy constructor 'Json::Value::CZString::CZString(const Json::Value::CZString&)':
ext/common/Utils/jsoncpp.cpp:1701:34: warning: enumeral and non-enumeral type in conditional expression [enabled by default]
mkdir -p buildout/agents/
mkdir -p buildout/common/libpassenger_common/agents/LoggingAgent
/opt/ruby-enterprise-1.8.7-2012.02/lib/ruby/gems/1.8/gems/passenger-4.0.29/ext/nginx/ContentHandler.c: In function 'create_request':
/opt/ruby-enterprise-1.8.7-2012.02/lib/ruby/gems/1.8/gems/passenger-4.0.29/ext/nginx/ContentHandler.c:403:31: error: 'ngx_http_connection_t' has no member named 'ssl'
/opt/ruby-enterprise-1.8.7-2012.02/lib/ruby/gems/1.8/gems/passenger-4.0.29/ext/nginx/ContentHandler.c:574:31: error: 'ngx_http_connection_t' has no member named 'ssl'
make[1]: *** [objs/addon/nginx/ContentHandler.o] Error 1
make: *** [build] Error 2
---- End output of /opt/ruby-enterprise-1.8.7-2012.02/bin/passenger-install-nginx-module --auto --prefix=/opt/nginx-1.2.6 --nginx-source-dir=/vagrant_data/clsi-chef/nginx-1.2.6 --extra-configure-flags="--sbin-path=/opt/nginx-1.2.6/sbin/nginx --conf-path=/opt/nginx-1.2.6/conf/nginx.conf --pid-path=/var/run/nginx.pid --error-log-path=/var/log/nginx/error.log --http-log-path=/var/log/nginx/access.log --user=www-data --with-http_ssl_module" ----
Ran /opt/ruby-enterprise-1.8.7-2012.02/bin/passenger-install-nginx-module --auto --prefix=/opt/nginx-1.2.6 --nginx-source-dir=/vagrant_data/clsi-chef/nginx-1.2.6 --extra-configure-flags="--sbin-path=/opt/nginx-1.2.6/sbin/nginx --conf-path=/opt/nginx-1.2.6/conf/nginx.conf --pid-path=/var/run/nginx.pid --error-log-path=/var/log/nginx/error.log --http-log-path=/var/log/nginx/access.log --user=www-data --with-http_ssl_module" returned 1

有什么想法吗?

最佳答案

您不需要编译 Nginx 来安装它。除非,你想要一些具体的东西。所以,要安装Nginx ,您可以通过以下两种方式做到这一点:

apt-get install nginx

如果 Ubuntu 没有找到 Nginx,您需要这样做:

echo "# For Nginx
deb http://nginx.org/packages/mainline/ubuntu/ precise nginx
deb-src http://nginx.org/packages/mainline/ubuntu/ precise nginx" >> /etc/apt/sources.list
wget "http://nginx.org/keys/nginx_signing.key"
apt-key add nginx_signing.key
rm nginx_signing.key
apt-get update
apt-get -y install nginx

此操作需要 root 权限。因此,对于其他人,您可能需要使用 sudo。

PS:对于 Ruby,抱歉,我没有这方面的知识。

关于ubuntu - ubuntu 上安装 nginx,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/20714903/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com