[英]Failed linking passenger 5.0.23 native support with Ruby 2.2.4
I am trying to make a clean APT install of Passenger latest stable 5.0.23
with Ruby 2.2.4
on Ubuntu 14.0.4 but I keep getting [passenger_native_support.so] will not be used (can't compile or download)
. 我正在尝试在Ubuntu 14.0.4上使用Ruby
2.2.4
进行全新的Passenger最新稳定版5.0.23
APT安装,但我一直在使用[passenger_native_support.so] will not be used (can't compile or download)
。 I've successfully compiled by hand the actual .so
: 我已经成功地手工编译了实际的
.so
:
➜ ~ passenger-config build-native-support
[passenger_native_support.so] trying to compile for the current Ruby interpreter...
(set PASSENGER_COMPILE_NATIVE_SUPPORT_BINARY=0 to disable)
Compilation succesful. The logs are here:
/tmp/passenger_native_support-1h838u1.log
[passenger_native_support.so] successfully loaded.
➜ ~ cat /tmp/passenger_native_support-1h838u1.log
# mkdir -p /root/.passenger/native_support/5.0.23/ruby-2.2.4-x86_64-linux
# cd /root/.passenger/native_support/5.0.23/ruby-2.2.4-x86_64-linux
# /usr/bin/ruby2.2 /usr/share/passenger/ruby_extension_source/extconf.rb
checking for alloca.h... yes
checking for ruby/version.h... yes
checking for ruby/io.h... yes
checking for ruby/thread.h... yes
checking for ruby_version... no
checking for rb_thread_io_blocking_region() in ruby/io.h... yes
checking for rb_thread_call_without_gvl() in ruby/thread.h... yes
creating Makefile
# make
compiling /usr/share/passenger/ruby_extension_source/passenger_native_support.c
linking shared-object passenger_native_support.so
But, it's still failing in Nginx: 但是,它在Nginx中仍然失败:
[ 2016-01-19 14:23:45.4123 1055/7f247600d7c0 age/Wat/WatchdogMain.cpp:1276 ]: Starting Passenger watchdog...
[ 2016-01-19 14:23:45.4406 1070/7f106e3067c0 age/Cor/CoreMain.cpp:957 ]: Starting Passenger core...
[ 2016-01-19 14:23:45.4407 1070/7f106e3067c0 age/Cor/CoreMain.cpp:234 ]: Passenger core running in multi-application mode.
[ 2016-01-19 14:23:45.4423 1070/7f106e3067c0 age/Cor/CoreMain.cpp:707 ]: Passenger core online, PID 1070
[ 2016-01-19 14:23:45.4475 1078/7f1c642e37c0 age/Ust/UstRouterMain.cpp:504 ]: Starting Passenger UstRouter...
[ 2016-01-19 14:23:45.4480 1078/7f1c642e37c0 age/Ust/UstRouterMain.cpp:317 ]: Passenger UstRouter online, PID 1078
App 1586 stdout:
App 1586 stderr: [passenger_native_support.so] trying to compile for the current Ruby interpreter...
App 1586 stderr: (set PASSENGER_COMPILE_NATIVE_SUPPORT_BINARY=0 to disable)
App 1586 stderr: [passenger_native_support.so] finding downloads for the current Ruby interpreter...
App 1586 stderr: (set PASSENGER_DOWNLOAD_NATIVE_SUPPORT_BINARY=0 to disable)
App 1586 stderr: Could not download https://oss-binaries.phusionpassenger.com/binaries/passenger/by_release/5.0.23/rubyext-ruby-2.2.4-x86_64-linux.tar.gz: The requested URL returned error: 404 Not Found
App 1586 stderr: Trying next mirror...
App 1586 stderr: Could not download https://s3.amazonaws.com/phusion-passenger/binaries/passenger/by_release/5.0.23/rubyext-ruby-2.2.4-x86_64-linux.tar.gz: The requested URL returned error: 403 Forbidden
App 1586 stderr: [passenger_native_support.so] will not be used (can't compile or download)
App 1586 stderr: --> Passenger will still operate normally.
App 1607 stdout:
Neither tarball archives exist on Passenger servers or S3. 乘客服务器或S3上都不存在tarball存档。
The actual Rails app works fine but I don't mind spending time finding the root causes of this warning. 实际的Rails应用程序运行良好,但我不介意花费时间查找此警告的根本原因。 Any idea about where to look next?
关于下一个地方有什么想法吗?
I've managed to find a workaround! 我设法找到了解决方法!
The issues was the .so
wasn't accessible to the nobody
user which was running Passenger. 问题是正在运行旅客的
nobody
用户无法访问.so
。 I've troubled compiling anything with the nobody
user, so I've ended up just copying the .so
from the root folder to /usr/lib/
: 我一直在用
nobody
用户来编译任何东西,所以我最终只是将.so
从根文件夹复制到/usr/lib/
:
cp /root/.passenger/native_support/5.0.23/ruby-2.2.4-x86_64-linux/passenger_native_support.so /usr/lib/x86_64-linux-gnu/ruby/2.2.0/passenger_native_support.so
I don't know if it's the cleanest thing ever but it's working. 我不知道这是否是有史以来最干净的东西,但是它正在运行。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.