Closed deyiluobo closed 3 years ago
I don't know if I installed pcre headers
I have executed the following commands
sudo apt-get install libpcre3 libpcre3-dev
and the relevant packages have been installed as follows :
libghc-regex-pcre-dev/bionic,now 0.94.4-9build1 amd64 [installed] libpcre16-3/bionic,now 2:8.39-9 amd64 [installed,automatic] libpcre3/bionic,now 2:8.39-9 amd64 [installed] libpcre3-dev/bionic,now 2:8.39-9 amd64 [installed] libpcre32-3/bionic,now 2:8.39-9 amd64 [installed,automatic] libpcrecpp0v5/bionic,now 2:8.39-9 amd64 [installed,automatic]
I've tried everything I know,please help!
i fixed it through the command: sudo apt-get install pkg-config
I had the same error on macos and fixed it using brew install pkg-config
On the first "stack build" on ubuntu18.04 install exits on failure :
jovyan@jupyter-yexiayi:~/duckling$ sudo stack build --allow-different-user regex-posix-clib > configure regex-posix-clib > Configuring regex-posix-clib-2.7... regex-posix-clib > build regex-posix-clib > Preprocessing library for regex-posix-clib-2.7.. regex-posix-clib > Building library for regex-posix-clib-2.7.. Did not find tree key in DB after pulling it from Casa: 627ad9d564650590654720934224090a4e8fc3225e84a7fd1af83bc86b2d446a,483 (for regex-base-0.94.0.0@sha256:44aa95ca762294ffbb28cf0af9c567d93b5d2c56e4f38ce5385a257d899f968e,2253 (from Hackage)) regex-posix-clib > copy/register regex-posix-clib > Installing library in /home/jovyan/.stack/snapshots/x86_64-linux/68854b8efbc19cfd8d2db89a7768488ab7b44994c994fe0859f8bf8da02696e3/8.8.4/lib/x86_64-linux-ghc-8.8.4/regex-posix-clib-2.7-BIn2p7YA1ysGGHW5DIIlXY old-locale > configure regex-posix-clib > Registering library for regex-posix-clib-2.7.. old-locale > Configuring old-locale-1.0.0.7... old-locale > build old-locale > Preprocessing library for old-locale-1.0.0.7.. old-locale > Building library for old-locale-1.0.0.7.. old-locale > [1 of 1] Compiling System.Locale old-locale > copy/register old-locale > Installing library in /home/jovyan/.stack/snapshots/x86_64-linux/68854b8efbc19cfd8d2db89a7768488ab7b44994c994fe0859f8bf8da02696e3/8.8.4/lib/x86_64-linux-ghc-8.8.4/old-locale-1.0.0.7-KOGgqu8HfWChZyQBUEp1c old-locale > Registering library for old-locale-1.0.0.7.. Did not find tree key in DB after pulling it from Casa: 119b67a712f8ba938383969b629cb3d489eacd10f9525346e19867ea0eb1be98,708 (for some-1.0.2@sha256:3d460998df32ad7b93bf55657aeae988d97070155e71718b4bc75d0997ce9d62,2244 (from Hackage)) regex-base > configure regex-base > Configuring regex-base-0.94.0.0... regex-base > build scientific > configure regex-base > Preprocessing library for regex-base-0.94.0.0.. regex-base > Building library for regex-base-0.94.0.0.. regex-base > [1 of 5] Compiling Paths_regex_base regex-base > [2 of 5] Compiling Text.Regex.Base.RegexLike scientific > Configuring scientific-0.3.6.2... scientific > build semigroups > configure scientific > Preprocessing library for scientific-0.3.6.2.. scientific > Building library for scientific-0.3.6.2.. scientific > [1 of 5] Compiling GHC.Integer.Compat scientific > [2 of 5] Compiling Utils scientific > [3 of 5] Compiling Data.Scientific semigroups > Configuring semigroups-0.19.1... semigroups > build some > configure regex-base > [3 of 5] Compiling Text.Regex.Base.Context semigroups > Preprocessing library for semigroups-0.19.1.. semigroups > Building library for semigroups-0.19.1.. semigroups > [1 of 1] Compiling Data.Semigroup.Generic some > Configuring some-1.0.2... semigroups > copy/register semigroups > Installing library in /home/jovyan/.stack/snapshots/x86_64-linux/68854b8efbc19cfd8d2db89a7768488ab7b44994c994fe0859f8bf8da02696e3/8.8.4/lib/x86_64-linux-ghc-8.8.4/semigroups-0.19.1-KswQSjRjA2JDrzoYmnhZUy some > build some > Preprocessing library for some-1.0.2.. some > Building library for some-1.0.2.. semigroups > Registering library for semigroups-0.19.1.. regex-base > [4 of 5] Compiling Text.Regex.Base regex-base > [5 of 5] Compiling Text.Regex.Base.Impl some > [1 of 8] Compiling Data.GADT.DeepSeq some > [2 of 8] Compiling Data.GADT.Internal regex-base > copy/register regex-base > Installing library in /home/jovyan/.stack/snapshots/x86_64-linux/68854b8efbc19cfd8d2db89a7768488ab7b44994c994fe0859f8bf8da02696e3/8.8.4/lib/x86_64-linux-ghc-8.8.4/regex-base-0.94.0.0-3lEao9661mNAzgJWClRz5I regex-base > Registering library for regex-base-0.94.0.0.. tagged > configure some > [3 of 8] Compiling Data.GADT.Compare some > [4 of 8] Compiling Data.GADT.Show some > [5 of 8] Compiling Data.Some.Church some > [6 of 8] Compiling Data.Some.GADT tagged > Configuring tagged-0.8.6.1... some > [7 of 8] Compiling Data.Some.Newtype tagged > build regex-pcre > configure tagged > Preprocessing library for tagged-0.8.6.1.. tagged > Building library for tagged-0.8.6.1.. some > [8 of 8] Compiling Data.Some tagged > [1 of 2] Compiling Data.Proxy.TH some > copy/register some > Installing library in /home/jovyan/.stack/snapshots/x86_64-linux/68854b8efbc19cfd8d2db89a7768488ab7b44994c994fe0859f8bf8da02696e3/8.8.4/lib/x86_64-linux-ghc-8.8.4/some-1.0.2-4Gh6GmR1iTrGWcPYE7Ik5l regex-pcre > Configuring regex-pcre-0.95.0.0... some > Registering library for some-1.0.2.. scientific > [4 of 5] Compiling Data.Text.Lazy.Builder.Scientific regex-pcre > Cabal-simple_mPHDZzAJ_3.0.1.0_ghc-8.8.4: The program 'pkg-config' version regex-pcre > >=0.9.0 is required but it could not be found. regex-pcre > tagged > [2 of 2] Compiling Data.Tagged scientific > scientific > /tmp/stack-f8d4c001761d8627/scientific-0.3.6.2/src/Data/Text/Lazy/Builder/Scientific.hs:20:1: warning: [-Wunused-imports] scientific > The import of ‘Data.Monoid’ is redundant scientific > except perhaps to import instances from ‘Data.Monoid’ scientific > To import instances alone, use: import Data.Monoid() scientific > | scientific > 20 | import Data.Monoid ((<>)) scientific > | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ scientific > [5 of 5] Compiling Data.ByteString.Builder.Scientific scientific > scientific > /tmp/stack-f8d4c001761d8627/scientific-0.3.6.2/src/Data/ByteString/Builder/Scientific.hs:25:1: warning: [-Wunused-imports] scientific > The import of ‘Data.Monoid’ is redundant scientific > except perhaps to import instances from ‘Data.Monoid’ scientific > To import instances alone, use: import Data.Monoid() scientific > | scientific > 25 | import Data.Monoid ((<>)) scientific > | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ tagged > copy/register tagged > Installing library in /home/jovyan/.stack/snapshots/x86_64-linux/68854b8efbc19cfd8d2db89a7768488ab7b44994c994fe0859f8bf8da02696e3/8.8.4/lib/x86_64-linux-ghc-8.8.4/tagged-0.8.6.1-8mJyURTFLDB2aiGDyQ1ZT3 tagged > Registering library for tagged-0.8.6.1.. scientific > scientific > copy/register scientific > Installing library in /home/jovyan/.stack/snapshots/x86_64-linux/68854b8efbc19cfd8d2db89a7768488ab7b44994c994fe0859f8bf8da02696e3/8.8.4/lib/x86_64-linux-ghc-8.8.4/scientific-0.3.6.2-3TV6X2ClZbD9mjE6AyXtOt scientific > Registering library for scientific-0.3.6.2.. Progress 8/40
-- While building package regex-pcre-0.95.0.0 (scroll up to its section to see the error) using: /home/jovyan/.stack/setup-exe-cache/x86_64-linux/Cabal-simple_mPHDZzAJ_3.0.1.0_ghc-8.8.4 --builddir=.stack-work/dist/x86_64-linux/Cabal-3.0.1.0 configure --user --package-db=clear --package-db=global --package-db=/home/jovyan/.stack/snapshots/x86_64-linux/68854b8efbc19cfd8d2db89a7768488ab7b44994c994fe0859f8bf8da02696e3/8.8.4/pkgdb --libdir=/home/jovyan/.stack/snapshots/x86_64-linux/68854b8efbc19cfd8d2db89a7768488ab7b44994c994fe0859f8bf8da02696e3/8.8.4/lib --bindir=/home/jovyan/.stack/snapshots/x86_64-linux/68854b8efbc19cfd8d2db89a7768488ab7b44994c994fe0859f8bf8da02696e3/8.8.4/bin --datadir=/home/jovyan/.stack/snapshots/x86_64-linux/68854b8efbc19cfd8d2db89a7768488ab7b44994c994fe0859f8bf8da02696e3/8.8.4/share --libexecdir=/home/jovyan/.stack/snapshots/x86_64-linux/68854b8efbc19cfd8d2db89a7768488ab7b44994c994fe0859f8bf8da02696e3/8.8.4/libexec --sysconfdir=/home/jovyan/.stack/snapshots/x86_64-linux/68854b8efbc19cfd8d2db89a7768488ab7b44994c994fe0859f8bf8da02696e3/8.8.4/etc --docdir=/home/jovyan/.stack/snapshots/x86_64-linux/68854b8efbc19cfd8d2db89a7768488ab7b44994c994fe0859f8bf8da02696e3/8.8.4/doc/regex-pcre-0.95.0.0 --htmldir=/home/jovyan/.stack/snapshots/x86_64-linux/68854b8efbc19cfd8d2db89a7768488ab7b44994c994fe0859f8bf8da02696e3/8.8.4/doc/regex-pcre-0.95.0.0 --haddockdir=/home/jovyan/.stack/snapshots/x86_64-linux/68854b8efbc19cfd8d2db89a7768488ab7b44994c994fe0859f8bf8da02696e3/8.8.4/doc/regex-pcre-0.95.0.0 --dependency=array=array-0.5.4.0 --dependency=base=base-4.13.0.0 --dependency=bytestring=bytestring-0.10.10.1 --dependency=containers=containers-0.6.2.1 --dependency=regex-base=regex-base-0.94.0.0-3lEao9661mNAzgJWClRz5I -fpkg-config --exact-configuration --ghc-option=-fhide-source-paths Process exited with code: ExitFailure 1