>  기사  >  PHP 프레임워크  >  Swoole 컴파일이 실패하는 경우 수행할 작업

Swoole 컴파일이 실패하는 경우 수행할 작업

藏色散人
藏色散人원래의
2020-04-10 09:06:373021검색

Swoole 컴파일이 실패하는 경우 수행할 작업

swoole컴파일이 실패하면 어떻게 해야 하나요?

swoole 컴파일 및 설치 프로세스 중에 발생한 문제

"perl: 경고: 표준 로케일("C")로 폴백합니다." 다음과 같은 기타 프롬프트 오류가 나타납니다.

perl: warning: Setting locale failed.
      perl: warning: Please check that your locale settings:
              LANGUAGE = "en_US.UTF-8",
              LC_ALL = "",
              LANG = "AMERICAN_AMERICA.UTF-8"
        are supported and installed on your system.
      perl: warning: Falling back to the standard locale ("C").

해결 방법:

In ~ /. bashrc 파일

export LANGUAGE="en_US.UTF-8"
export:zh_CN.UTF-8
export LC_ALL=C

에 다음 내용을 추가한 후 다음 명령을 실행하여 적용합니다.

source /root/.bashrc
configure: error: C++ preprocessor “/lib/cpp” fails sanity check
configure: error: in `/wwwroot/swoole-4.2.5':
configure: error: C++ preprocessor "/lib/cpp" fails sanity check

문제의 근본 원인은 필요한 C++ 라이브러리가 부족하다는 것입니다. 문제를 해결하려면 다음 명령을 실행하세요.

yum install glibc-headers
yum install gcc-c++
“Enable http2 support, require nghttp2 library” 错误
/wwwroot/swoole-4.2.5/php_swoole.h:142:2: error: #error "Enable http2 support, require nghttp2 library."
 #error "Enable http2 support, require nghttp2 library."

nghttp2를 설치해야 합니다. 먼저 종속 라이브러리를 설치하세요

sudo yum -y groupinstall "Development Tools"
sudo yum -y install openssl-devel libxml2-devel libev-devel jemalloc-devel python-devel
wget https://c-ares.haxx.se/download/c-ares-1.12.0.tar.gz -O /tmp/c-ares.tar.gz
mkdir -p /tmp/c-ares
tar -zxvf /tmp/c-ares.tar.gz -C /tmp/c-ares --strip-components=1
cd /tmp/c-ares && ./configure --libdir=/usr/lib64
make
sudo make install
wget http://www.digip.org/jansson/releases/jansson-2.9.tar.gz -O /tmp/jansson.tar.gz
mkdir -p /tmp/jansson
tar -zxvf /tmp/jansson.tar.gz -C /tmp/jansson --strip-components=1
cd /tmp/jansson && ./configure --libdir=/usr/lib64
make
make check
sudo make inst

nghttp2 서비스 설치:

wget https://github.com/nghttp2/nghttp2/releases/download/v1.19.0/nghttp2-1.19.0.tar.gz -O /tmp/nghttp2.tar.gz
mkdir -p /tmp/nghttp2
tar -zxvf /tmp/nghttp2.tar.gz -C /tmp/nghttp2 --strip-components=1
cd /tmp/nghttp2 && ./configure --enable-app
make
sudo make install

hiredis가 존재하지 않습니다.

/wwwroot/swoole-4.2.5/swoole_redis.c:20:29: fatal error: hiredis/hiredis.h: No such file or directory
 #include <hiredis/hiredis.h>

redis 및 Hireis 서비스를 설치해야 합니다.

redis 설치:

yum -y install tcl
wget http://download.redis.io/releases/redis-3.0.7.tar.gz
tar xzf redis-3.0.7.tar.gz 
cd redis-3.0.7
make
make test
make install

hireis 설치:

wget https://github.com/redis/hiredis/archive/v0.14.0.tar.gz
tar xzf  v0.14.0.tar.gz
cd hiredis-0.14.0/
make
make install

위 내용은 Swoole 컴파일이 실패하는 경우 수행할 작업의 상세 내용입니다. 자세한 내용은 PHP 중국어 웹사이트의 기타 관련 기사를 참조하세요!

성명:
본 글의 내용은 네티즌들의 자발적인 기여로 작성되었으며, 저작권은 원저작자에게 있습니다. 본 사이트는 이에 상응하는 법적 책임을 지지 않습니다. 표절이나 침해가 의심되는 콘텐츠를 발견한 경우 admin@php.cn으로 문의하세요.