我在 debian wheezy raspberry pi 上运行 ruby 和 ruby gems。当我passenger-install-apache2-module
在安装 apache2 和乘客 gem 后运行命令时,它会在检查所有组件是否已安装时给出:
Apache:
Use of uninitialized value $includedir in concatenation (.) or string at (eval 9) line 1.
Use of uninitialized value $includedir in concatenation (.) or string at (eval 9) line 1.
然后当它开始编译时,它会显示:
Compiling and installing Apache 2 module...
cd /usr/lib/ruby/gems/1.9.1/gems/passenger-3.0.19
/usr/bin/ruby1.9.1 /usr/bin/rake apache2:clean apache2 RELEASE=yes
# /usr/bin/ruby1.9.1 /usr/bin/rake apache2:clean apache2 RELEASE=yes
Use of uninitialized value $includedir in concatenation (.) or string at (eval 9) line 1.
Use of uninitialized value $includedir in concatenation (.) or string at (eval 9) line 1.
Use of uninitialized value $includedir in concatenation (.) or string at (eval 9) line 1.
Use of uninitialized value $includedir in concatenation (.) or string at (eval 9) line 1.
rm -rf ext/common/libboost_oxt.a ext/common/libboost_oxt
rm -rf ext/common/libpassenger_common.a ext/common/libpassenger_common
rm -f agents/PassengerWatchdog agents/PassengerLoggingAgent
rm -rf ext/apache2/module_libboost_oxt.a ext/apache2/module_libboost_oxt
rm -rf ext/apache2/module_libpassenger_common.a ext/apache2/module_libpassenger_common
rm -rf ext/apache2/Configuration.o ext/apache2/Bucket.o ext/apache2/Hooks.o ext/apache2/mod_passenger.o ext/apache2/mod_passenger.so agents/PassengerHelperAgent
mkdir -p ext/apache2/module_libpassenger_common
g++ -Iext -Iext/common -Iext/libev -fPIC -fvisibility=hidden -DVISIBILITY_ATTRIBUTE_SUPPORTED -Wno-attributes -D_REENTRANT -D_GNU_SOURCE -D_LARGEFILE64_SOURCE -I/usr/include/apr-1.0 -I/usr/include/apr-1.0 -I/usr/include -D_FORTIFY_SOURCE=2 -D_GNU_SOURCE -D_LARGEFILE64_SOURCE -D_REENTRANT -I/usr/include -I/usr/include/apr-1.0 -I/usr/include/openssl -I/usr/include/xmltok -pthread -I/usr/include/apache2 -D_REENTRANT -I/usr/local/include -DHASH_NAMESPACE="__gnu_cxx" -DHASH_NAMESPACE="__gnu_cxx" -DHASH_FUN_H="<hash_fun.h>" -DBOOST_SP_USE_PTHREADS -DHAS_ALLOCA_H -Wall -Wextra -Wno-unused-parameter -Wno-parentheses -Wpointer-arith -Wwrite-strings -Wno-long-long -Wno-missing-field-initializers -g -DPASSENGER_DEBUG -DBOOST_DISABLE_ASSERTS -o ext/apache2/module_libpassenger_common/aggregate.o -c ext/apache2/module_libpassenger_common/aggregate.cpp
rm -rf ext/apache2/module_libpassenger_common.a
ar cru ext/apache2/module_libpassenger_common.a ext/apache2/module_libpassenger_common/aggregate.o
ranlib ext/apache2/module_libpassenger_common.a
mkdir -p ext/apache2/module_libboost_oxt
g++ -Iext -fPIC -fvisibility=hidden -DVISIBILITY_ATTRIBUTE_SUPPORTED -Wno-attributes -D_REENTRANT -D_GNU_SOURCE -D_LARGEFILE64_SOURCE -I/usr/include/apr-1.0 -I/usr/include/apr-1.0 -I/usr/include -D_FORTIFY_SOURCE=2 -D_GNU_SOURCE -D_LARGEFILE64_SOURCE -D_REENTRANT -I/usr/include -I/usr/include/apr-1.0 -I/usr/include/openssl -I/usr/include/xmltok -pthread -I/usr/include/apache2 -D_REENTRANT -I/usr/local/include -DHASH_NAMESPACE="__gnu_cxx" -DHASH_NAMESPACE="__gnu_cxx" -DHASH_FUN_H="<hash_fun.h>" -DBOOST_SP_USE_PTHREADS -DHAS_ALLOCA_H -Wall -Wextra -Wno-unused-parameter -Wno-parentheses -Wpointer-arith -Wwrite-strings -Wno-long-long -Wno-missing-field-initializers -g -DPASSENGER_DEBUG -DBOOST_DISABLE_ASSERTS -o ext/apache2/module_libboost_oxt/aggregate.o -c ext/apache2/module_libboost_oxt/aggregate.cpp
In file included from ext/boost/src/pthread/thread.cpp:27:0,
from ext/apache2/module_libboost_oxt/aggregate.cpp:6:
ext/boost/src/pthread/timeconv.inl: In function âvoid {anonymous}::to_time(int, boost::xtime&)â:
ext/boost/src/pthread/timeconv.inl:22:9: warning: variable âresâ set but not used [-Wunused-but-set-variable]
ext/boost/src/pthread/timeconv.inl: In function âvoid {anonymous}::to_timespec_duration(const boost::xtime&, timespec&)â:
ext/boost/src/pthread/timeconv.inl:59:9: warning: variable âresâ set but not used [-Wunused-but-set-variable]
ext/boost/src/pthread/timeconv.inl: In function âvoid {anonymous}::to_duration(boost::xtime, int&)â:
ext/boost/src/pthread/timeconv.inl:90:9: warning: variable âresâ set but not used [-Wunused-but-set-variable]
ext/boost/src/pthread/timeconv.inl: In function âvoid {anonymous}::to_microduration(boost::xtime, int&)â:
ext/boost/src/pthread/timeconv.inl:112:9: warning: variable âresâ set but not used [-Wunused-but-set-variable]
我已尝试重新安装 apache 和乘客,但错误仍然存在。Apache 正常运行,否则。
编辑:未安装 apache 标头时不会出现“未初始化值”警告。一旦我安装它们,就会发生错误。