We have a php application on App Engine and we use Cloud Build to build the app. Today a new version was supposed to be build and deployed, however the build process reported the following error after trying to deploy on App Engine
php-fpm: error while loading shared libraries: libzip.so.4: cannot open shared object file: No such file or directory
I have compared the last working image and the new image and I see a difference in the configuration command used to build the php. The new image uses the following command:
Configure Command => './configure' '--enable-bcmath' '--enable-calendar' '--enable-dba' '--enable-exif' '--enable-fpm' '--enable-ftp' '--enable-intl' '--enable-mbstring' '--enable-mysqlnd' '--enable-pcntl' '--enable-shmop' '--enable-soap' '--enable-sockets' '--enable-sysvshm' '--enable-zend-test' '--prefix=/layers/google.php.runtime/php' '--sysconfdir=/etc' '--with-bz2' '--with-config-file-path=/etc' '--with-config-file-scan-dir=/workspace' '--with-curl' '--with-enchant' '--with-gettext' '--with-gmp' '--with-imap-ssl' '--with-ldap' '--with-libdir=lib/x86_64-linux-gnu' '--with-mhash' '--with-mysqli' '--with-openssl' '--with-pcre-jit' '--with-pdo-mysql' '--with-pdo-pgsql' '--with-pear' '--with-pgsql' '--with-tidy' '--with-xsl' '--with-zlib' '--enable-gd' '--with-jpeg' '--with-freetype' '--with-zip'
The issue is that '--with-zip' was added but libzip4 is not installed on the image.
I don't see a way to install the library manually or to specify what should be the base image for the build. This means that we can't deploy the new version.
Any suggestions how to resolve this issue?
If you have similar issue you can use the following things:
app.yamlfile:App Engine. You will need to find thebuildand correspondingrunimages (you can find the images used in theCloud Buildlogs). You will need to fix the issues with these images by building a new one starting from the problematic one. After this you will need to build your image using the fixed build/run images. To specify the the build is forApp Engineyou need to set theGAE_APPLICATION_YAML_PATHenv like this--env GAE_APPLICATION_YAML_PATH="app.yaml"when building the image. After you build the image you should deploy this image toApp EngineCloud Build(the one that is with the issue) and modify it by fixing the issue inside it. You can find the image in theCloud Buildlogs. After you build the image you should deploy this image toApp Engine