# Does Nginx require PCRE under FreeBSD?



## max21 (Mar 13, 2015)

This quote leads me to believe that FreeBSD has something built-in the base or kernel that would provide most of the needed functions automatically, and there is no need to install PCRE.  But before I start taking things for-granted I better ask ...

Would this apply to FreeBSD also?


> You need to make sure that the package for PCRE is installed when using OpenBSD. Use the command "pkg_add -i pcre" to install from your chosen PKG_PATH repository. BTW, you may want to also look at the Perl script pkg_find for OpenBSD package management.



https://calomel.org/nginx.html


----------



## xtaz (Mar 13, 2015)

Yes, looks like it links itself to pcre.


```
$ ldd `which nginx`
/usr/local/sbin/nginx:
...
  libpcre.so.1 => /usr/local/lib/libpcre.so.1 (0x800d09000)
...

$ pkg which /usr/local/lib/libpcre.so.1
/usr/local/lib/libpcre.so.1 was installed by package pcre-8.35_2
```
It would drag that in as an automatic dependency if you installed nginx so there's no need to worry about it.


----------



## getopt (Mar 13, 2015)

A good place for quickly looking up dependencies and the default port options configuration of a port that you want install is:
http://www.freshports.org
It is a very helpful web-tool for searching ports. With the informations provided you are getting a sense in advance about what you want to be installed.


----------



## uzsolt (Mar 18, 2015)

You have some possibilities:
`pkg info --dependencies nginx` - if you've installed nginx
`pkg rquery "%dn" nginx`
`make all-depends-list -C /usr/ports/www/nginx` - if you've ports tree


----------

