리눅스 PCRE 빌드 설치

(Last Updated On: December 11, 2020)

linux pcre 설치..

1 소스 받기

https://ftp.pcre.org/pub/pcre/ ( pcre-8.44.tar.gz )

mkdir -p /opt/pcre
wget -qO- https://ftp.pcre.org/pub/pcre/pcre-8.44.tar.gz | tar xvz --strip 1 -C /opt/pcre
cd /opt/pcre

2 빌드 및 설치

./configure --prefix=/usr                     \
            --docdir=/usr/share/doc/pcre-8.42 \
            --enable-unicode-properties       \
            --enable-pcre16                   \
            --enable-pcre32                   \
            --enable-pcregrep-libz            \
            --enable-pcregrep-libbz2          \
            --enable-pcretest-libreadline     \
            --disable-static                  && \
make -j$(nproc) && \
make install

bzip2: ** Cannot –enable-pcregrep-libbz2 because bzlib.h was not found

cd /opt
git clone git://sourceware.org/git/bzip2.git && cd bzip2 && make && make install

** Cannot –enable-pcretest-readline because readline/readline.h was not found.