Ubuntu / Debian Install PCRE Library ( Perl 5 Compatible Regular Expression Library )

I need to compile few application and I need Perl 5 Compatible Regular Expression Library (PCRE). Under CentOS I can use a package called pcre-devel, but Debian do not have the same. How do I install pcre-devel under Debian / Ubuntu Linux?

Perl-compatible regular expression library. PCRE has its own native API, but a set of “wrapper” functions that are based on the POSIX API are also supplied in the library libpcreposix. Note that this just provides a POSIX calling interface to PCRE: the regular expressions themselves still follow Perl syntax and semantics. The header file for the POSIX-style functions is called pcreposix.h. To install PCRE, type thy following command:
# apt-get update
# apt-get install libpcre3 libpcre3-dev

🐧 If you liked this page, please support my work on Patreon or with a donation.
🐧 Get the latest tutorials on SysAdmin, Linux/Unix, Open Source/DevOps topics:
CategoryList of Unix and Linux commands
File Managementcat
FirewallAlpine Awall CentOS 8 OpenSUSE RHEL 8 Ubuntu 16.04 Ubuntu 18.04 Ubuntu 20.04
Network Utilitiesdig host ip nmap
OpenVPNCentOS 7 CentOS 8 Debian 10 Debian 8/9 Ubuntu 18.04 Ubuntu 20.04
Package Managerapk apt
Processes Managementbg chroot cron disown fg jobs killall kill pidof pstree pwdx time
Searchinggrep whereis which
User Informationgroups id lastcomm last lid/libuser-lid logname members users whoami who w
WireGuard VPNAlpine CentOS 8 Debian 10 Firewall Ubuntu 20.04
9 comments… add one
  • noobuntu Nov 29, 2010 @ 21:29

    thank you sir!

  • Shaki Heighton Jun 16, 2011 @ 13:36

    Hi, I’ve got a problem to install pcre in Ubuntu 10.04 LTS ‘cuz I’m getting error message that the is not found. Do I need to enable/add some repository ?

    Thanks anyway …

    • Shaki Heighton Jun 16, 2011 @ 13:37

      Hi, I’ve got a problem to install pcre in Ubuntu 10.04 LTS ‘cuz I’m getting error message that the package is not found. Do I need to enable/add some repository ?

      Thanks anyway …

      • Samuel Thampy May 22, 2015 @ 13:11

        Have you tried to update before installing.

  • arcus Feb 28, 2012 @ 10:35

    it resolved my problem
    I install passenger 3 for Ubuntu 11.04, error:
    PCRE could not be downloaded

  • EvilG Nov 22, 2012 @ 21:58

    Thank you!

    Saved me a lot of trouble.

  • Revathi Aug 30, 2013 @ 11:20

    I have problem in install pcre. I give command in my terminal it saying,
    E: Could not open lock file /var/lib/dpkg/lock – open (13: Permission denied)
    E: Unable to lock the administration directory (/var/lib/dpkg/), are you root?.

    • Samuel May 22, 2015 @ 13:10

      You have to be root to install

  • csrgxtu Feb 25, 2014 @ 6:56

    thank you for solving my problem, i am using Lubuntu12.04 and want to install Nginx, when it appears a problem that says i don’t have a pcre lib.

Leave a Reply

Your email address will not be published. Required fields are marked *

Use HTML <pre>...</pre>, <code>...</code> and <kbd>...</kbd> for code samples.