rebuild uwsgi with pcre support

前端 未结 7 1086
夕颜
夕颜 2020-12-01 01:25

when running uwsgi i get the following message:

!!! no internal routing support, rebuild with pcre support !!!

I already have installed pcr

相关标签:
7条回答
  • 2020-12-01 01:33
    pip install uwsgi -I
    

    Won't recompile the uwsgi binary, it just reinstalls the python egg. You need to rebuild the uwsgi binary with the pcre libraries.

    sudo apt-get install libpcre3 libpcre3-dev
    

    I think the easiest way is just to uninstall uwsgi and then run the pip installer again.

    pip uninstall uwsgi
    sudo apt-get remove uwsgi
    

    then

    pip install uwsgi
    

    you should see pip run the setup.py script and a bunch of compiler messages. The last message should show you something like this:

    ################# uWSGI configuration #################
    
    pcre = True
    kernel = Linux
    malloc = libc
    execinfo = False
    ifaddrs = True
    ssl = True
    zlib = True
    locking = pthread_mutex
    plugin_dir = .
    timer = timerfd
    yaml = embedded
    json = False
    filemonitor = inotify
    routing = True
    debug = False
    capabilities = False
    xml = libxml2
    event = epoll
    
    ############## end of uWSGI configuration #############
    

    notice how pcre = true now

    0 讨论(0)
  • 2020-12-01 01:43
    pip uninstall uwsgi
    
    sudo apt-get install libpcre3 libpcre3-dev
    
    pip install uwsgi
    

    I solved it with the above commands.

    0 讨论(0)
  • 2020-12-01 01:46

    pip install uwsgi -I --no-cache-dir

    It reinstalls (-I) as @leech said, but ignores the compiled cache (--no-cache-dir) and recompiles the thing with the new libs.

    0 讨论(0)
  • 2020-12-01 01:47

    Completing @alanjds answer, following is the process to add pcre support to your already installed uWSGI.

    sudo apt-get install libpcre3 libpcre3-dev
    pip install uwsgi -I --no-cache-dir
    

    You do not need to uninstall uWSGI

    0 讨论(0)
  • 2020-12-01 01:51

    If you have tried all above but it is still have the same error and with the below ones, please check your command parameters, particular the --http-socket /path/to/your.sock. That is the path = '/path/to' must be existed

    thunder lock: disabled (you can enable it with --thunder-lock)
    bind(): No such file or directory [core/socket.c line 230]
    
    0 讨论(0)
  • 2020-12-01 01:55

    Did you try:

    pip install uwsgi -I 
    

    The -I flag will force it to reinstall

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