swoole-src
swoole-src copied to clipboard
Can not install Swoole v5.1.3 due to unavailability of package "libbrotlienc" on Ubuntu 22.04. The package is also not locatable in Ubuntu Repos.
Please answer these questions before submitting your issue.
- What did you do? If possible, provide a simple script for reproducing the error.
sudo mkdir -m 775 /tmp && \
cd /tmp && \
git clone https://github.com/swoole/swoole-src && \
cd swoole-src && \
git checkout v5.1.3 && \
phpize8.3 clean && \
phpize8.3 && \
./configure --enable-openssl \
--enable-mysqlnd \
--enable-sockets \
--enable-http2 \
--enable-swoole-curl \
--enable-swoole-json \
--with-postgres \
--enable-debug \
--enable-debug-log \
--enable-trace-log \
--enable-thread-context \
--enable-cares \
--with-php-config=/usr/bin/php-config8.3
I tried installing libbrotlienc using apt-get install but i got :
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
E: Unable to locate package libbrotlienc
- What did you expect to see?
Succesful installation.
- What did you see instead?
Installation finally ends up on message below: .... checking for libbrotlienc... no configure: error: Package requirements (libbrotlienc) were not met:
No package 'libbrotlienc' found
Consider adjusting the PKG_CONFIG_PATH environment variable if you installed software in a non-standard prefix.
Alternatively, you may set the environment variables BROTLIENC_CFLAGS and BROTLIENC_LIBS to avoid the need to call pkg-config. See the pkg-config man page for more details.
- What version of Swoole are you using (show your
php --ri swoole)?
Trying to install Swoole v5.1.3
- What is your machine environment used (show your
uname -a&php -v&gcc -v) ?
Linux HP-Laptop 5.17.5-76051705-generic #202204271406165150484020.04~63e51bd-Ubuntu SMP PREEMPT Wed Ma x86_64 x86_64 x86_64 GNU/Linux
PHP 8.3.8 (cli) (built: Jun 6 2024 16:58:27) (NTS) Copyright (c) The PHP Group Zend Engine v4.3.8, Copyright (c) Zend Technologies with Zend OPcache v8.3.8, Copyright (c), by Zend Technologies
COLLECT_GCC=gcc COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-linux-gnu/11/lto-wrapper OFFLOAD_TARGET_NAMES=nvptx-none:amdgcn-amdhsa OFFLOAD_TARGET_DEFAULT=1 Target: x86_64-linux-gnu Configured with: ../src/configure -v --with-pkgversion='Ubuntu 11.4.0-1ubuntu122.04' --with-bugurl=file:///usr/share/doc/gcc-11/README.Bugs --enable-languages=c,ada,c++,go,brig,d,fortran,objc,obj-c++,m2 --prefix=/usr --with-gcc-major-version-only --program-suffix=-11 --program-prefix=x86_64-linux-gnu- --enable-shared --enable-linker-build-id --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --libdir=/usr/lib --enable-nls --enable-bootstrap --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --with-default-libstdcxx-abi=new --enable-gnu-unique-object --disable-vtable-verify --enable-plugin --enable-default-pie --with-system-zlib --enable-libphobos-checking=release --with-target-system-zlib=auto --enable-objc-gc=auto --enable-multiarch --disable-werror --enable-cet --with-arch-32=i686 --with-abi=m64 --with-multilib-list=m32,m64,mx32 --enable-multilib --with-tune=generic --enable-offload-targets=nvptx-none=/build/gcc-11-XeT9lY/gcc-11-11.4.0/debian/tmp-nvptx/usr,amdgcn-amdhsa=/build/gcc-11-XeT9lY/gcc-11-11.4.0/debian/tmp-gcn/usr --without-cuda-driver --enable-checking=release --build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=x86_64-linux-gnu --with-build-config=bootstrap-lto-lean --enable-link-serialization=2 Thread model: posix Supported LTO compression algorithms: zlib zstd gcc version 11.4.0 (Ubuntu 11.4.0-1ubuntu122.04)
apt install libbrotli-dev
+1, I use centos.
Here's the error message I got:
configure: error: Package requirements (libbrotlienc) were not met:
Package 'libbrotlienc', required by 'virtual:world', not found
Consider adjusting the PKG_CONFIG_PATH environment variable if you
installed software in a non-standard prefix.
Alternatively, you may set the environment variables BROTLIENC_CFLAGS
and BROTLIENC_LIBS to avoid the need to call pkg-config.
See the pkg-config man page for more details.
I solved the problem by installing brotli on cmake.
@GHJayce We improved config.m4; some configurations can now set library locations via pkg-config.
@NathanFreeman Thanks, Following your tips, I noticed the --with-brotli-dir option in config.mp4 and documentation. This option was already included in version 5.0.1.
For those using alpine: apk add --no-cache libstdc++ brotli-dev