Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PHP 7.4 and laravel horizon #2407

Closed
lionslair opened this issue Dec 6, 2019 · 6 comments
Closed

PHP 7.4 and laravel horizon #2407

lionslair opened this issue Dec 6, 2019 · 6 comments

Comments

@lionslair
Copy link
Contributor

Info:

Issue:

Using php 7.4 in .env I get the following output
checking for oniguruma... no
configure: error: Package requirements (oniguruma) were not met:

Package 'oniguruma', required by 'virtual:world', not found

Consider adjusting the PKG_CONFIG_PATH environment variable if you
installed software in a non-standard prefix.

Alternatively, you may set the environment variables ONIG_CFLAGS
and ONIG_LIBS to avoid the need to call pkg-config.
See the pkg-config man page for more details.
ERROR: Service 'laravel-horizon' failed to build: The command '/bin/sh -c docker-php-ext-install mysqli mbstring pdo pdo_mysql tokenizer xml pcntl exif' returned a non-zero code: 1


Expected behavior:

laravel-horizon compiles with php 7.4

Reproduce:

Clone the above repository and do docker-compose up with .env PHP_VERSION=7.4


Relevant Code:

checking for oniguruma... no
configure: error: Package requirements (oniguruma) were not met:

Package 'oniguruma', required by 'virtual:world', not found

Consider adjusting the PKG_CONFIG_PATH environment variable if you
installed software in a non-standard prefix.

Alternatively, you may set the environment variables ONIG_CFLAGS
and ONIG_LIBS to avoid the need to call pkg-config.
See the pkg-config man page for more details.
ERROR: Service 'laravel-horizon' failed to build: The command '/bin/sh -c docker-php-ext-install mysqli mbstring pdo pdo_mysql tokenizer xml pcntl exif' returned a non-zero code: 1
@zoulux
Copy link
Contributor

zoulux commented Dec 6, 2019

I have repaired it
RUN docker-php-ext-install mysqli pdo pdo_mysql tokenizer xml pcntl
delete mbstring

@lionslair
Copy link
Contributor Author

Your fix seems to solve that original issue but then I get issues about
configure: error: unrecognized options: --with-libzip

and similar with other parts. I feel like maybe other containers or options are not ready for php 7.4 yet. Do not get the issues on 7.3

@zoulux
Copy link
Contributor

zoulux commented Dec 9, 2019

@lionslair yes,you are right。It not ready for php 7.4 yet。

@ghost
Copy link

ghost commented Dec 9, 2019

I had the issue, and I provided a fix in #2414, its for the php worker, but may work for laravel horizon, i wouldn't say its a permanent fix, but if you're in need of a fix asap, this may just work for now

@kadekjayak
Copy link

i also get those error message when trying to build php-worker with PHP 7.4

removing mbstring on Dockerfile like @zoulux suggest has fix the problem :D

bestlong added a commit to bestlong/laradock that referenced this issue Dec 21, 2019
@lorisleiva
Copy link

lorisleiva commented Jan 13, 2020

Hi there 👋

I was also struggling to upgrade my Laravel Dockerfile from 7.3 to 7.4 and I was having the exact same error messages.

  1. First, I got the error configure: error: unrecognized options: --with-libzip which I fixed by removing the following line since according to this, it is now re-bundled by PHP >= 7.3.
RUN docker-php-ext-configure zip --with-libzip
  1. Next, I got the error configure: error: Package requirements (oniguruma) were not met. I fixed that one by removing the installation of mbstring since according to this, it is already installed and configured by the PHP image I was using (I double-checked this by running php -m | grep mbstring inside the built image). An alternative to that one is to install the libonig-dev library (or oniguruma-dev for alpine) to fix the dependency problem.

I hope this helps 🍀

NetBT pushed a commit to NetBT/opdock that referenced this issue Jan 17, 2020
akmolina28 added a commit to akmolina28/docker-laravel-queue-worker that referenced this issue Sep 11, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants