Bz2 installation error using dockerfile

290.4 checking if zts is enabled… no
290.5 checking for gawk… no
290.5 checking for nawk… nawk
290.5 checking if nawk is broken… no
290.5 checking for BZip2 support… yes, shared
290.5 checking for BZip2 in default path… not found
290.5 configure: error: Please reinstall the BZip2 distribution

failed to solve: process “/bin/sh -c apt-get update -y && \tapt-get install --no-install-recommends smbclient libsmbclient-dev -y && \tpecl install smbclient && \tdocker-php-ext-install bz2 && docker-php-ext-enable smbclient” did not complete successfully: exit code: 1

anyone can help me solved this error? this is working before and now when I use it again it doesnt work now.

It looks like you’re trying to add the bz2 PHP extension. That won’t work unless you also install the bz2 libraries.

That said, did you by chance add this line for the bz2 check in Nextcloud that was briefly in place a few months back? That’s no longer the case so bz2 should not be added unless you’re using it yourself for something. Nextcloud doesn’t use nor check for it any longer.

So just remove it.