Valet-plus: Cannot find installation path for: apcu_bc

Created on 25 Jan 2019  路  22Comments  路  Source: weprovide/valet-plus

New error occurred when I ran valet install --with-maria-db after updating composer to the latest version of valet-plus 1.0.26

In Pecl.php line 134:
Could not find installation path for: apcu_bc
sudo: pecl: command not found

Do I just ignore this?

1.0.x

Most helpful comment

Okay, so I was able to get past it. For every version of PHP you use, edit the php.ini file, and replace the [openssl] section with this:

[openssl]
; The location of a Certificate Authority (CA) file on the local filesystem
; to use when verifying the identity of SSL/TLS peers. Most users should
; not specify a value for this directive as PHP will attempt to use the
; OS-managed cert stores in its absence. If specified, this value may still
; be overridden on a per-stream basis via the "cafile" SSL stream context
; option.
openssl.cafile = "/usr/local/etc/[email protected]/cert.pem"

; If openssl.cafile is not specified or if the CA file is not found, the
; directory pointed to by openssl.capath is searched for a suitable
; certificate. This value must be a correctly hashed certificate directory.
; Most users should not specify a value for this directive as PHP will
; attempt to use the OS-managed cert stores in its absence. If specified,
; this value may still be overridden on a per-stream basis via the "capath"
; SSL stream context option.
openssl.capath = "/usr/local/etc/[email protected]/certs"

To be clear, this is after you ensure you've ran brew reinstall openssl and are running [email protected]

All 22 comments

@kupoback I think this is an error generated by the installation script when one tries to upgrade valet-plus using an Brew PHP version instead of a valet-php version.

Do you switch to [email protected] before upgrading?

@Neodork I was using [email protected] That's after doing what was suggest in issue #308

@kupoback So I've been able to reproduce this error on an old macbook we had laying around which was upgraded to Mojave. And only for PHP 7.2. I'm still debugging the cause.

@neodork thank you for the update! Glad it wasn鈥檛 a one off issue!

This error occured for me when switching to php 7.2

[[email protected]] Unlinking
Unlinking /usr/local/Cellar/[email protected]/5.6.40... 25 symlinks removed

[libjpeg] Relinking
[[email protected]] Linking
Linking /usr/local/Cellar/[email protected]/7.1.31... 25 symlinks created

If you need to have this software first in your PATH instead consider running:
  echo 'export PATH="/usr/local/opt/[email protected]/bin:$PATH"' >> ~/.zshrc
  echo 'export PATH="/usr/local/opt/[email protected]/sbin:$PATH"' >> ~/.zshrc

[[email protected]] Stopping
[[email protected]] Stopping
[[email protected]] Stopping
[[email protected]] Stopping
[BREW TAP] henkrehorst/php already installed
[PECL] Updating PECL channel: pecl.php.net
[PECL] Installing extensions

In Pecl.php line 147:

  Could not find installation path for: apcu_bc

  downloading apcu_bc-1.0.5.tgz ...
  Starting to download apcu_bc-1.0.5.tgz (7,415 bytes)
  .....done: 7,415 bytes
  4 source files, building

  Warning: preg_match(): Unknown modifier '7' in Builder.php on line 310

  Warning: preg_match(): Unknown modifier '7' in /usr/local/Cellar/[email protected]/7
  .1.31/share/[email protected]/pear/PEAR/Builder.php on line 310
  running: phpize
  PHP Warning:  preg_match(): Unknown modifier '7' in /usr/local/Cellar/valet-php@
  7.1/7.1.31/share/[email protected]/pear/PEAR/Builder.php on line 310
  Configuring for:
  PHP Api Version:         20160303
  Zend Module Api No:      20160303
  Zend Extension Api No:   320160303
  building in /private/tmp/pear/temp/pear-build-jakeworrallp7tJvx/apcu_bc-1.0.5
  running: /private/tmp/pear/temp/apcu_bc/configure --with-php-config=/usr/local/o
  pt/[email protected]/bin/php-config
  checking for grep that handles long lines and -e... /usr/bin/grep
  checking for egrep... /usr/bin/grep -E
  checking for a sed that does not truncate output... /usr/bin/sed
  checking for cc... cc
  checking whether the C compiler works... yes
  checking for C compiler default output file name... a.out
  checking for suffix of executables...
  checking whether we are cross compiling... no
  checking for suffix of object files... o
  checking whether we are using the GNU C compiler... yes
  checking whether cc accepts -g... yes
  checking for cc option to accept ISO C89... none needed
  checking how to run the C preprocessor... cc -E
  checking for icc... no
  checking for suncc... no
  checking whether cc understands -c and -o together... yes
  checking for system library directory... lib
  checking if compiler supports -R... no
  checking if compiler supports -Wl,-rpath,... yes
  checking build system type... x86_64-apple-darwin18.6.0
  checking host system type... x86_64-apple-darwin18.6.0
  checking target system type... x86_64-apple-darwin18.6.0
  checking for PHP prefix... /usr/local/Cellar/[email protected]/7.1.31
  checking for PHP includes... -I/usr/local/Cellar/[email protected]/7.1.31/include/ph
  p -I/usr/local/Cellar/[email protected]/7.1.31/include/php/main -I/usr/local/Cellar/
  [email protected]/7.1.31/include/php/TSRM -I/usr/local/Cellar/[email protected]/7.1.31/i
  nclude/php/Zend -I/usr/local/Cellar/[email protected]/7.1.31/include/php/ext -I/usr/
  local/Cellar/[email protected]/7.1.31/include/php/ext/date/lib
  checking for PHP extension directory... /usr/local/Cellar/[email protected]/7.1.31/p
  ecl/20160303
  checking for PHP installed headers prefix... /usr/local/Cellar/[email protected]/7.1
  .31/include/php
  checking if debug is enabled... no
  checking if zts is enabled... no
  checking for re2c... no
  configure: WARNING: You will need re2c 0.13.4 or later if you want to regenerate
   PHP parsers.
  checking for gawk... no
  checking for nawk... no
  checking for awk... awk
  checking if awk is broken... no
  checking whether to enable APCu BC support... yes, shared
  checking for ld used by cc... /Library/Developer/CommandLineTools/usr/bin/ld
  checking if the linker (/Library/Developer/CommandLineTools/usr/bin/ld) is GNU l
  d... no
  checking for /Library/Developer/CommandLineTools/usr/bin/ld option to reload obj
  ect files... -r
  checking for BSD-compatible nm... /usr/bin/nm -B
  checking whether ln -s works... yes
  checking how to recognize dependent libraries... pass_all
  checking for ANSI C header files... yes
  checking for sys/types.h... yes
  checking for sys/stat.h... yes
  checking for stdlib.h... yes
  checking for string.h... yes
  checking for memory.h... yes
  checking for strings.h... yes
  checking for inttypes.h... yes
  checking for stdint.h... yes
  checking for unistd.h... yes
  checking dlfcn.h usability... yes
  checking dlfcn.h presence... yes
  checking for dlfcn.h... yes
  checking the maximum length of command line arguments... 196608
  checking command to parse /usr/bin/nm -B output from cc object... ok
  checking for objdir... .libs
  checking for ar... ar
  checking for ranlib... ranlib
  checking for strip... strip
  checking for dsymutil... dsymutil
  checking for nmedit... nmedit
  checking for -single_module linker flag... yes
  checking for -exported_symbols_list linker flag... yes
  checking if cc supports -fno-rtti -fno-exceptions... yes
  checking for cc option to produce PIC... -fno-common
  checking if cc PIC flag -fno-common works... yes
  checking if cc static flag -static works... no
  checking if cc supports -c -o file.o... yes
  checking whether the cc linker (/Library/Developer/CommandLineTools/usr/bin/ld)
  supports shared libraries... yes
  checking dynamic linker characteristics... darwin18.6.0 dyld
  checking how to hardcode library paths into programs... immediate
  checking whether stripping libraries is possible... yes
  checking if libtool supports shared libraries... yes
  checking whether to build shared libraries... yes
  checking whether to build static libraries... no

  creating libtool
  appending configuration tag "CXX" to libtool
  configure: creating ./config.status
  config.status: creating config.h
  running: make
  /bin/sh /private/tmp/pear/temp/pear-build-jakeworrallp7tJvx/apcu_bc-1.0.5/libtoo
  l --mode=compile cc -DZEND_ENABLE_STATIC_TSRMLS_CACHE=1 -I. -I/private/tmp/pear/
  temp/apcu_bc -DPHP_ATOM_INC -I/private/tmp/pear/temp/pear-build-jakeworrallp7tJv
  x/apcu_bc-1.0.5/include -I/private/tmp/pear/temp/pear-build-jakeworrallp7tJvx/ap
  cu_bc-1.0.5/main -I/private/tmp/pear/temp/apcu_bc -I/usr/local/Cellar/valet-php@
  7.1/7.1.31/include/php -I/usr/local/Cellar/[email protected]/7.1.31/include/php/main
   -I/usr/local/Cellar/[email protected]/7.1.31/include/php/TSRM -I/usr/local/Cellar/v
  [email protected]/7.1.31/include/php/Zend -I/usr/local/Cellar/[email protected]/7.1.31/in
  clude/php/ext -I/usr/local/Cellar/[email protected]/7.1.31/include/php/ext/date/lib
   -DHAVE_CONFIG_H  -g -O2   -c /private/tmp/pear/temp/apcu_bc/php_apc.c -o php_ap
  c.lo
  mkdir .libs
   cc -DZEND_ENABLE_STATIC_TSRMLS_CACHE=1 -I. -I/private/tmp/pear/temp/apcu_bc -DP
  HP_ATOM_INC -I/private/tmp/pear/temp/pear-build-jakeworrallp7tJvx/apcu_bc-1.0.5/
  include -I/private/tmp/pear/temp/pear-build-jakeworrallp7tJvx/apcu_bc-1.0.5/main
   -I/private/tmp/pear/temp/apcu_bc -I/usr/local/Cellar/[email protected]/7.1.31/inclu
  de/php -I/usr/local/Cellar/[email protected]/7.1.31/include/php/main -I/usr/local/Ce
  llar/[email protected]/7.1.31/include/php/TSRM -I/usr/local/Cellar/[email protected]/7.1
  .31/include/php/Zend -I/usr/local/Cellar/[email protected]/7.1.31/include/php/ext -I
  /usr/local/Cellar/[email protected]/7.1.31/include/php/ext/date/lib -DHAVE_CONFIG_H
  -g -O2 -c /private/tmp/pear/temp/apcu_bc/php_apc.c  -fno-common -DPIC -o .libs/p
  hp_apc.o
  /private/tmp/pear/temp/apcu_bc/php_apc.c:34:10: fatal error: 'ext/apcu/php_apc.h
  ' file not found
  #include "ext/apcu/php_apc.h"
           ^~~~~~~~~~~~~~~~~~~~
  1 error generated.
  make: *** [php_apc.lo] Error 1
  ERROR: `make' failed

I get the same issue whenever I run brew install [email protected]. Has this been solved?

Hey all,

The apcu_bc bugs were solved in https://github.com/weprovide/valet-plus/pull/401 for the 2.x version.

Does that mean we should be moving to 2.0? I.e., is 2.0 ready?

I wanted to setup valet on a new mac running Mojave. Ran in to the apcu_bc issue. So applied the changes suggested on #401 and then ran installation again and now getting:
Could not find installation path for: apcu

I can't seem to get passed this error message and can't install valet.

I have the same problem as @nishpatel

@nishpatel & @ScottRoach,

When I ran pecl update-channels I got the following error message which is also causing the "Could not find installation path for : apcu" but more verbose.

Channel "pear.php.net" is not responding over http://, failed with message: Connection to `ssl://pear.php.net:443' failed: 
Trying channel "pear.php.net" over https:// instead

I did some googling and found a question on Stack Overflow describing the same issue, but with two solutions.

One of them would be to replace your certificate to one you'd download from "curl.haxx.io", but the brew reinstall openssl came across as a bit more secure than downloading a random certificate.

So, try brew reinstall openssl and after that pecl update-channels to verify that the SSL error is gone. If it's gone, try installing or reinstall Valet+ like described in the documentation.

@Neodork I've tried @Serializator 's solution but it didn't work for me. Any chance we could get a solution for Valet+ 1.0.x?

We've come across this issue multiple times now. Tried @Serializator's solution to no avail. Not sure exactly what changed, as valet-plus used to install perfectly from a fresh Mac before. Has anyone found a solution to this?

Okay, so I was able to get past it. For every version of PHP you use, edit the php.ini file, and replace the [openssl] section with this:

[openssl]
; The location of a Certificate Authority (CA) file on the local filesystem
; to use when verifying the identity of SSL/TLS peers. Most users should
; not specify a value for this directive as PHP will attempt to use the
; OS-managed cert stores in its absence. If specified, this value may still
; be overridden on a per-stream basis via the "cafile" SSL stream context
; option.
openssl.cafile = "/usr/local/etc/[email protected]/cert.pem"

; If openssl.cafile is not specified or if the CA file is not found, the
; directory pointed to by openssl.capath is searched for a suitable
; certificate. This value must be a correctly hashed certificate directory.
; Most users should not specify a value for this directive as PHP will
; attempt to use the OS-managed cert stores in its absence. If specified,
; this value may still be overridden on a per-stream basis via the "capath"
; SSL stream context option.
openssl.capath = "/usr/local/etc/[email protected]/certs"

To be clear, this is after you ensure you've ran brew reinstall openssl and are running [email protected]

Unfortunately none of the previous workaround worked for me.
In my case I have to downgrade to apcu to 5.1.14 to be able to finish the installation.

pecl uninstall apcu
pecl install apcu-5.1.14
valet install

I also encounter the problem that I get the following error message when I try to install valet+ with the command "valet install":

````
Could not find installation path for: apcu_bc

No releases available for package "pecl.php.net/apcu_bc"
install failed
````

I tried all the suggested workarounds in this thread, but nothing helped to solve the problem. My setup is:

Mac Mini Mid 2010 with 8Gb Ram & SSD running High Sierra

Too bad that no solution is available after 1 year of discussions.

So am I right, that nobody was able to install Valet+ within the last year due to this error?

Shouldn't this trigger some reaction by the contributors?

Can I install Valet+ 2.0 where this problem has supposedly been resolved?

I am now using Mamp Pro, but it is rather sluggish ...

Thanks for your help

Jens

Hi guys, I found this in the slack channel
https://github.com/weprovide/valet-plus/blob/2.x/UPGRADE-2.0.md

I upgraded mine but have hot had the chance to fully tested it.
Please give a try and then we can discuss

Hi guys, I found this in the slack channel
https://github.com/weprovide/valet-plus/blob/2.x/UPGRADE-2.0.md

I upgraded mine but have hot had the chance to fully tested it.
Please give a try and then we can discuss

Thanks, but I was never able to install ANY version of Valet+ due to the apcu_bc problem.

I tried the commands from the slack channel but they did not work, since neither apcu nor apcu_bc have been successfully installed in my system. The php.ini file also does not contain any reference to the corresponding .so files.

How can I install version 2.0 of Valet+?

Thanks
Jens

Please note that the original issue mentioned in this ticket is not related to:

Could not find installation path for: apcu_bc

But to:

sudo: pecl: command not found

That being said if you have issue with apcu_bc that's because it's deprecated and we've updated that in the 2.x-devversion. Existing 1.0.x installs won't be affected but if you install a new 1.0.x you will not be able to get past the apcu_bc install.

To install the bleeding edge (2.x-dev) use composer require weprovide/valet-plus:2.x-dev AND apply the upgrade path: https://github.com/weprovide/valet-plus/blob/2.x/UPGRADE-2.0.md

I will now close this issue since I've not been able to reproduce this on newer machines, only older models with already deprecated versions of MacOS.

When upgrading to 2.x it still asks for apcu, with errors. In my case, the autom4te lib was using pecl from MAMP. I found out when I renamed /Applications/MAMP and could see the error.

Then I reinstalled everything with brew reinstall autoconf automake libtool.
This was the error with Valet 2:

$ valet install
[php] Checking for errors within the php installation...
[nginx] Stopping
[[email protected]] Stopping
[[email protected]] Stopping
[[email protected]] Stopping
[[email protected]] Stopping
[redis] Stopping
[devtools] Installing tools
[devtools] wp-cli already installed
[devtools] pv already installed
[devtools] geoip already installed
[devtools] zlib already installed
[binaries] Installing binaries
[BREW TAP] henkrehorst/php already installed
[PECL] Updating PECL channel: pecl.php.net
[PECL] Installing extensions

In Pecl.php line 145:

Could not find installation path for: apcu

downloading apcu-5.1.17.tgz ...
Starting to download apcu-5.1.17.tgz (94,814 bytes)
.....................done: 94,814 bytes
39 source files, building

Warning: preg_match(): Unknown modifier '7' in Builder.php on line 310

Warning: preg_match(): Unknown modifier '7' in /usr/local/Cellar/[email protected]/7.2.24_2/share/[email protected]/pear/PEAR/Builder.php on line 310
running: phpize
PHP Warning: preg_match(): Unknown modifier '7' in /usr/local/Cellar/[email protected]/7.2.24_2/share/[email protected]/pear/PEAR/Builder.php on line 310
Configuring for:
PHP Api Version: 20170718
Zend Module Api No: 20170718
Zend Extension Api No: 320170718
Can't load '/Applications/MAMP/Library/lib/perl5/5.24.0/darwin-thread-multi-2level/auto/Fcntl/Fcntl.bundle' for module Fcntl: dlopen(/Applications/MAMP/Library/lib/perl
5/5.24.0/darwin-thread-multi-2level/auto/Fcntl/Fcntl.bundle, 1): no suitable image found. Did find:
/Applications/MAMP/Library/lib/perl5/5.24.0/darwin-thread-multi-2level/auto/Fcntl/Fcntl.bundle: code signature in (/Applications/MAMP/Library/lib/perl5/5.24.0/darwin-t
hread-multi-2level/auto/Fcntl/Fcntl.bundle) not valid for use in process using Library Validation: mapped file has no cdhash, completely unsigned? Code has to be at lea
st ad-hoc signed. at /Applications/MAMP/Library/lib/perl5/5.24.0/XSLoader.pm line 74.
\ at /Applications/MAMP/Library/lib/perl5/5.24.0/darwin-thread-multi-2level/Fcntl.pm line 66.
Compilation failed in require at /Applications/MAMP/Library/lib/perl5/5.24.0/File/stat.pm line 30.
BEGIN failed--compilation aborted at /Applications/MAMP/Library/lib/perl5/5.24.0/File/stat.pm line 30.
Compilation failed in require at /usr/local/share/autoconf/Autom4te/FileUtils.pm line 40.
BEGIN failed--compilation aborted at /usr/local/share/autoconf/Autom4te/FileUtils.pm line 40.
Compilation failed in require at /usr/local/bin/autom4te line 40.
BEGIN failed--compilation aborted at /usr/local/bin/autom4te line 40.
ERROR: `phpize' failed

install [--with-mariadb]

On my case, it is an issue with MacOS Mojave and its new OpenSSL. I had to uninstall it and install another version:

brew uninstall openssl 
brew install https://github.com/tebelorg/Tump/releases/download/v1.0.0/openssl.rb

Okay, so I was able to get past it. For every version of PHP you use, edit the php.ini file, and replace the [openssl] section with this:

[openssl]
; The location of a Certificate Authority (CA) file on the local filesystem
; to use when verifying the identity of SSL/TLS peers. Most users should
; not specify a value for this directive as PHP will attempt to use the
; OS-managed cert stores in its absence. If specified, this value may still
; be overridden on a per-stream basis via the "cafile" SSL stream context
; option.
openssl.cafile = "/usr/local/etc/[email protected]/cert.pem"

; If openssl.cafile is not specified or if the CA file is not found, the
; directory pointed to by openssl.capath is searched for a suitable
; certificate. This value must be a correctly hashed certificate directory.
; Most users should not specify a value for this directive as PHP will
; attempt to use the OS-managed cert stores in its absence. If specified,
; this value may still be overridden on a per-stream basis via the "capath"
; SSL stream context option.
openssl.capath = "/usr/local/etc/[email protected]/certs"

To be clear, this is after you ensure you've ran brew reinstall openssl and are running [email protected]

This worked for me well

Was this page helpful?
0 / 5 - 0 ratings

Related issues

ezequielalba picture ezequielalba  路  15Comments

jahvi picture jahvi  路  24Comments

MaxSouza picture MaxSouza  路  46Comments

SanderAtom picture SanderAtom  路  23Comments

dwillitzer picture dwillitzer  路  18Comments