Skip to content

libv8_libplatform configure error with docker php-apache #403

Closed
@jlwalkerlg

Description

@jlwalkerlg

I am trying to build a Docker image from the official php docker image (specifically I am using the php:7.3.4-apache version) with the v8js extension enabled. I keep running into an error when v8js is being installed with PECL.

Here is my Dockerfile:

FROM php:7.3.4-apache

# Install v8js
RUN apt-get update && apt-get install -y libv8-dev
RUN pecl install v8js-2.1.0 && docker-php-ext-enable v8js

libv8-dev installs successfully, as far as I can tell, but the pecl install v8js-2.1.0 fails with the following output:

...
checking for V8 Javascript Engine... yes, shared
checking for V8 files in default path... found in /usr
checking for g++... g++
checking whether we are using the GNU C++ compiler... yes
checking whether g++ accepts -g... yes
checking how to run the C++ preprocessor... g++ -E
checking for C standard version... c++11
checking how to allow c++11 narrowing... -Wno-narrowing
checking for libv8_libplatform... configure: error: could not find libv8_libplatform library
ERROR: `/tmp/pear/temp/v8js/configure --with-php-config=/usr/local/bin/php-config --with-v8js' failed
The command '/bin/sh -c pecl install v8js-2.1.0 && docker-php-ext-enable v8js' returned a non-zero code: 1

I've searched through similar issues people are having with libv8_libplatform not being found but they are all using different setups (i.e. not using the php Docker image) and I am not familiar enough with Linux to piece together a solution, so would appreciate any help I can get. Thanks

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions