Error Installing Pcre

Error installing PCRE

You need a C++ compiler installed, you'll most likely want g++.

With apt-get, run 'apt-get install g++', or 'apt-get install build-essential', since build-essential includes g++.

Error in the installation of PCRE

I would suggest doing. It installs all libraries needed to build pcre

apt-get build-dep libpcre3-dev

Apache installation; libpcre error

1. Download PCRE from PCRE.org

2. Compile it with a prefix and install it:

./configure --prefix=/usr/local/pcre
make
make install

3. Go back to where your Apache installation is and compile Apache with PCRE:

--with-pcre=/usr/local/pcre

pcre2.h: No such file or directory

try:

sudo ln -s /opt/local/include/pcre.h /usr/include/       "replace your file location here"
sudo pecl install apc

Cabal install pcre-light on windows. Extra-include-dirs/extra-lib-dirs not working

I really need to answer this problem since I suppose that a lot of people suffered from it. Just be clear for my system specification: Windows 7 64-bit, GHC 7.8.3 64-bit, cabal 1.20.0.3

Possible failure reasons:

1. missing C library

2.32-bit library is incompatible with 64-bit GHC.

You need to do:

1. A kind company airesoft built pcre with Microsoft Visual Studio 2008. Go to http://www.airesoft.co.uk/pcre to download the pcre you want or click http://www.airesoft.co.uk/files/pcre/pcre-8.33.zip to download 8.33. (Can somebody upload it to sourceforge?)

2. Change the file name pcre3.lib to pcre.lib and pcreposix3.lib to pcreposix.lib(I suppose this file is actually not needed but just in case.) I copied the file instead renaming it directly, but I think both ways are fine.

3. Depending 32 or 64-bit GHC, you need to specify the extra library and include. pcre-light requires pcre.h and pcre.lib. On my machine I just run

cabal install pcre-light --extra-lib-dirs=E:\\DOWNLOAD\\pcre-8.33\\lib\\x64 --extra-include-dirs=E:\\DOWNLOAD\\pcre-8.33\\inc

If your GHC is 32-bit you just remove the \\x64 in the above command

4. Of course, you need to add pcre3.dll into your system library path. I just copied it to C:\Windows\System32 directory. (I am not sure whether you need to rename it to pcre.dll, keep both in case. Make sure you choose the right file since 32-bit dll will crash on 64-bit machine and vice versa) Open your GHCi you should be able to import Text.Regex.PCRE.Light and try to invoke some functions.

I will try to merge the files into the pcre-light package inside it if possible.
Good luck



Related Topics



Leave a reply



Submit