根据本文档Passenger 是自 RHEL6 以来的原生 yum 软件包。
Linux 版本和类型
[vagrant@localhost ~]$ cat /etc/*release
Scientific Linux release 6.5 (Carbon)
Scientific Linux release 6.5 (Carbon)
百胜安装乘客
安装 RPM 之前
[vagrant@localhost ~]$ sudo yum search passenger
Loaded plugins: security
sl | 3.6 kB 00:00
sl-security | 3.0 kB 00:00
sl-security/primary_db | 4.5 MB 00:17
sl6x | 3.6 kB 00:00
sl6x-security | 3.0 kB 00:00
sl6x-security/primary_db | 4.5 MB 00:19
Warning: No matches found for: passenger
No Matches found
安装 RPM 后
[vagrant@localhost ~]$ sudo yum install mod_passenger -y
Loaded plugins: security
sl | 3.6 kB 00:00
sl-security | 3.0 kB 00:00
sl-security/primary_db | 4.5 MB 00:19
sl6x | 3.6 kB 00:00
sl6x-security | 3.0 kB 00:00
sl6x-security/primary_db | 4.5 MB 00:17
Setting up Install Process
No package mod_passenger available.
Error: Nothing to do
由于乘客不包含在 yum 存储库中,因此尝试使用 RPM 安装它,尽管根据文档,这只在 RHEL 5 的情况下才需要。
转速安装
RPM 已安装。
[vagrant@localhost ~]$ sudo rpm -Uvh http://passenger.stealthymonkeys.com/rhel/5/passenger-release.noarch.rpm
Retrieving http://passenger.stealthymonkeys.com/rhel/5/passenger-release.noarch.rpm
warning: /var/tmp/rpm-tmp.w5Z8Il: Header V4 DSA/SHA1 Signature, key ID 71e042e4: NOKEY
Preparing... ########################################### [100%]
1:passenger-release ########################################### [100%]
安装 RPM 后进行 yum install
[vagrant@localhost ~]$ sudo yum install mod_passenger -y Loaded plugins: security
http://passenger.stealthymonkeys.com/rhel/6.5/x86_64/repodata/repomd.xml: [Errno 14] PYCURL ERROR 22 - "The requested URL returned error: 404 Not Found"
Trying other mirror.
http://passenger.stealthymonkeys.com/rhel/6.5/x86_64/repodata/repomd.xml: [Errno 14] PYCURL ERROR 22 - "The requested URL returned error: 404 Not Found"
Trying other mirror.
http://mirror.hmdc.harvard.edu/mirrors/passenger/rhel/6.5/x86_64/repodata/repomd.xml: [Errno 14] PYCURL ERROR 22 - "The requested URL returned error: 404 Not Found"
Trying other mirror.
Error: Cannot retrieve repository metadata (repomd.xml) for repository: passenger. Please verify its path and try again
百胜搜索
[vagrant@localhost ~]$ sudo yum search passenger
Loaded plugins: security
http://passenger.stealthymonkeys.com/rhel/6.5/x86_64/repodata/repomd.xml: [Errno 14] PYCURL ERROR 22 - "The requested URL returned error: 404 Not Found"
Trying other mirror.
http://passenger.stealthymonkeys.com/rhel/6.5/x86_64/repodata/repomd.xml: [Errno 14] PYCURL ERROR 22 - "The requested URL returned error: 404 Not Found"
Trying other mirror.
http://mirror.hmdc.harvard.edu/mirrors/passenger/rhel/6.5/x86_64/repodata/repomd.xml: [Errno 14] PYCURL ERROR 22 - "The requested URL returned error: 404 Not Found"
Trying other mirror.
Error: Cannot retrieve repository metadata (repomd.xml) for repository: passenger. Please verify its path and try again
6.5 目录不可用
看来是6.5了。目录不存在。
问题
如何通过 RPM 在 Scientific Linux 6.5 上安装 Passenger?
答案1
感谢 @terdon 和 @slm 的建议,可以通过执行以下命令找到该包(yum search guest):
sudo rpm --import http://passenger.stealthymonkeys.com/RPM-GPG-KEY-stealthymonkeys.asc && \
sudo yum -y install http://passenger.stealthymonkeys.com/rhel/6/passenger-release.noarch.rpm && \
sudo sed -i 's/\$releasever/6.3/g' /etc/yum.repos.d/passenger.repo
但是安装passenger后出现了一些依赖问题:
Error: Package: 1:rubygem-passenger-native-3.0.19-1.el6.x86_64 (passenger)
Requires: libev.so.4()(64bit)
Error: Package: 1:rubygem-passenger-native-3.0.19-1.el6.x86_64 (passenger)
Requires: libev
Error: Package: 1:rubygem-passenger-3.0.19-1.el6.x86_64 (passenger)
Requires: rubygem(fastthread) >= 1.0.1
Error: Package: 1:rubygem-passenger-3.0.19-1.el6.x86_64 (passenger)
Requires: rubygem(rack)
这些可以通过执行以下命令来解决:
sudo rpm -ivh http://dl.fedoraproject.org/pub/epel/6/x86_64/libev-4.03-3.el6.x86_64.rpm && \
sudo yum -y install rubygems && \
for p in rubygem-fastthread-1.0.7-2.el6.x86_64 rubygem-rack-1.1.0-2.el6.noarch; do sudo rpm -ivh http://dl.fedoraproject.org/pub/epel/6/x86_64/${p}.rpm; done && \
sudo yum -y install mod_passenger