Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

314
Vistas
sudo pecl install mongodb problem | unknown type name 'pcre_cache_entry'

I'm trying to install mongodb exentsion for php 8.0.13 on my MacOS Monterey.

I try sudo pecl install mongodb command: and then get below errror.

/opt/homebrew/Cellar/php@8.0/8.0.13/include/php/ext/spl/spl_iterators.h:151:4: error: unknown type name 'pcre_cache_entry'
                    pcre_cache_entry *pce;
                    ^
1 error generated.
make: *** [php_phongo.lo] Error 1
ERROR: `make' failed

enter image description here

which php: /opt/homebrew/bin/php php -v: PHP 8.0.13 (cli) (built: Nov 28 2021 13:11:14) ( NTS ) Copyright (c) The PHP Group Zend Engine v4.0.13, Copyright (c) Zend Technologies with Zend OPcache v8.0.13, Copyright (c), by Zend Technologies

Can anyone help me for fix this error? Thanks for your attention!

over 4 years ago · Santiago Trujillo
1 Respuestas
Responde la pregunta

0

To compile MongoDB using PECL you will have to copy the pcre2.h to php's include directory.

For php@8.0, you can do this, But you will have to do this after every PHP release or if you switch the PHP version.

pcre2_h="$(find "$(brew --cellar pcre2)" -name "pcre2.h")"
cp -f "$pcre2_h" "$(brew --cellar php@8.0)"/*/include/php/ext/pcre

To avoid this I would recommend using shivammathur/extensions brew tap for installing PHP extensions.

over 4 years ago · Santiago Trujillo Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda