Newrelic nginx 外掛安裝(python 問題)

Newrelic nginx 外掛安裝(python 問題)

這個插件不讓我安裝,我試圖寫入以獲取 nginx 的幫助..(不是一個好的體驗)。該插件說我沒有為 python 安裝守護進程,但事實上我安裝了(我相信)。我曾經試著寫信尋求支持,但 nginx 的人非常粗魯,讓我去搗鹽。任何有關如何解決此問題的見解將不勝感激!我使用的是 centos 6,其餘資訊如下:)

我的錯誤需要幫助修復:

錯誤:軟體包:nginx-nr-agent-2.0.0-12.el6.ngx.noarch (nginx) 需要:python-daemon

查看實際輸出:

[root@pod12 httpdocs]# python -V
Python 2.6.6
[root@pod12 httpdocs]# python2.7 -V
Python 2.7.14
[root@pod12 httpdocs]# which pip
/usr/local/bin/pip
[root@pod12 httpdocs]# cd /usr/local/bin
[root@pod12 bin]# python2.7 pip install python-daemon
Requirement already satisfied: python-daemon in /usr/local/lib/python2.7/site-packages
Requirement already satisfied: docutils in /usr/local/lib/python2.7/site-packages (from python-daemon)
Requirement already satisfied: lockfile>=0.10 in /usr/local/lib/python2.7/site-packages (from python-daemon)
Requirement already satisfied: setuptools in /usr/local/lib/python2.7/site-packages (from python-daemon)
[root@pod12 bin]# yum install nginx-nr-agent
Loaded plugins: fastestmirror
Setting up Install Process
Loading mirror speeds from cached hostfile
 * base: ftp.linux.ncsu.edu
 * extras: mirror.cs.pitt.edu
 * updates: mirror.vtti.vt.edu
Resolving Dependencies
--> Running transaction check
---> Package nginx-nr-agent.noarch 0:2.0.0-12.el6.ngx will be installed
--> Processing Dependency: python-daemon for package: nginx-nr-agent-2.0.0-12.el6.ngx.noarch
--> Finished Dependency Resolution
Error: Package: nginx-nr-agent-2.0.0-12.el6.ngx.noarch (nginx)
           Requires: python-daemon
 You could try using --skip-broken to work around the problem
 You could try running: rpm -Va --nofiles --nodigest
[root@pod12 bin]# 

更新(感謝邁克爾)-現在我有以下內容:

[root@pod12 ~]# service nginx-nr-agent start
Traceback (most recent call last):
  File "/usr/bin/nginx-nr-agent.py", line 13, in <module>
    from daemon import runner
  File "/usr/lib/python2.6/site-packages/daemon/runner.py", line 25, in <module>
    import pidlockfile
  File "/usr/lib/python2.6/site-packages/daemon/pidlockfile.py", line 33, in <module>
    class PIDLockFile(LinkFileLock, object):
TypeError: Error when calling the metaclass bases
    function() argument 1 must be code, not str

答案1

python-daemon 位於 EPEL 儲存庫中。安裝並啟用此儲存庫,然後重試。

相關內容