Opened 3 years ago
Last modified 3 years ago
#64741 new defect
php81 Unable to start pcre module
Reported by: | ShadSterling (Shad Sterling) | Owned by: | |
---|---|---|---|
Priority: | Normal | Milestone: | |
Component: | ports | Version: | 2.7.1 |
Keywords: | pcre | Cc: | ryandesign (Ryan Carsten Schmidt) |
Port: | php81 |
Description
After upgrading to Monterey and following the usual macports update procedure, I installed the php81
port to replace the php
that was included in earlier versions of macOS. Unfortunately, every invocation fails with the same error. For example, running/opt/local/bin/php81 --version
outputs
Fatal error: Unable to start pcre module in Unknown on line 0
The pcre
port is installed. Ports php80
, php74
are also affected.
How can I collect whatever information is needed to diagnose this problem?
Change History (4)
comment:1 Changed 3 years ago by ShadSterling (Shad Sterling)
comment:2 follow-up: 3 Changed 3 years ago by ShadSterling (Shad Sterling)
After running my routine update cycle for the first time after upgrading to Monterey, the error returned, and this time reinstalling pcre2
didn't fix it.
Turns out php73
is not affected, so until newer versions are usable I'll be using php73
comment:3 Changed 3 years ago by ryandesign (Ryan Carsten Schmidt)
Replying to ShadSterling:
Fatal error: Unable to start pcre module in Unknown on line 0
Hmm, I haven't encountered this before. Googling this error, I found a page suggesting it could be caused by copies of libpcre in /usr/local/lib. Do you have anything in /usr/local/lib? If so, I recommend removing what you have in /usr/local; see wiki:FAQ#usrlocal.
Replying to ShadSterling:
Looks like installing
pcre2
fixed it. Butpcre2
is listed as a library dependency ofphp81
, so how didphp81
get installed without one of its dependencies?
I cannot imagine any way that that could have happened.
Replying to ShadSterling:
After running my routine update cycle for the first time after upgrading to Monterey, the error returned, and this time reinstalling
pcre2
didn't fix it.
That's curious.
Turns out
php73
is not affected, so until newer versions are usable I'll be usingphp73
That's curious too. If anything I would have expected you to say that php72 and earlier are not affected but php73 and later are. php72 and earlier use pcre while php73 and later use pcre2.
comment:4 Changed 3 years ago by ShadSterling (Shad Sterling)
I have GPGMail and a few other things that install to /usr/local, so I'm not going to just remove it all, but there's nothing that looks like pcre
in /usr/local/lib
This time I tried installing php81 -libedit
and php81 -libedit+readline
, both of which are also unaffected, so maybe the problem has something to do with libedit
What other information can I collect to diagnose this problem?
Looks like installing
pcre2
fixed it. Butpcre2
is listed as a library dependency ofphp81
, so how didphp81
get installed without one of its dependencies?