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]# 

更新(感谢 Michael)-现在我有以下内容:

[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 存储库中。安装并启用此存储库,然后重试。

相关内容