Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save tkhoa2711/3bac05cf1ccc652f1ad7 to your computer and use it in GitHub Desktop.
Save tkhoa2711/3bac05cf1ccc652f1ad7 to your computer and use it in GitHub Desktop.
Error during compilation from source - bin/sh: line 2: ./configure: No such file or directory
If you happen to see this error during compilation for programs, for example that's nginx in my case:
...
./configure --disable-shared
/bin/sh: line 2: ./configure: No such file or directory
...
In this case I already configured nginx with my custom-built PCRE library:
./configure --with-pcre=<path-to-lib-containing-pcre>
However, specifying --with-pcre instructs the program to use the path as the source dir to build instead of using it as the installation dir for PCRE. To achieve what we actually want, use --with-cc-opt and --with-ld-opt options as a replacement:
./configure --with-cc-opt=-I<pcre-install-dir>/include --with-ld-opt=-L<pcre-install-dir>/lib
Works like magic!
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment