Can't Start Carbon - 12.04 - Python Error - ImportError: cannot import name daemonize

后端 未结 5 960
逝去的感伤
逝去的感伤 2020-12-25 12:56

I am really hoping someone can help me as I have spent at-least 15 hours trying to fix this problem. I have been given a task by a potential employer and my solution is to u

相关标签:
5条回答
  • 2020-12-25 13:32

    You can likely remove refences to daemonize from lib/carbon/util.py and then it seems to work with twisted 13.2.0. See carbon github commit 1d0bdc5c6ac331fdcb6f6c0f897507fcf833f616 from Nov 18 2013

    https://github.com/graphite-project/carbon/commit/1d0bdc5c6ac331fdcb6f6c0f897507fcf833f616

    0 讨论(0)
  • 2020-12-25 13:32

    Newest version of Twisted won't work.

    Install version 13.0:

    pip install http://twistedmatrix.com/Releases/Twisted/13.0/Twisted-13.0.0.tar.bz2
    0 讨论(0)
  • 2020-12-25 13:35
    pip install 'Twisted<12.0'
    

    As you can see in the requirements.txt, the newer version of Twisted does not seems to play well with it

    0 讨论(0)
  • 2020-12-25 13:35

    I tried with pip install Twisted==11.1.0 but not got it downgrade my Twisted version. So, i renamed /usr/lib/python2.7/dist-packages/twisted/ to other name. After i install twisted pip install Twisted==11.1.0 and sudo ./bin/carbon-cache.py start works.

    0 讨论(0)
  • 2020-12-25 13:39
    pip install daemonize
    

    then I opened /opt/graphite/lib/carbon/util.py and changed

    from twisted.scripts._twistd_unix import daemonize
    

    to

    import daemonize
    
    0 讨论(0)
提交回复
热议问题