Closed gvanto closed 10 months ago
Hi Gvanto,
This looks to be an issue with your system environment as per the error composer has returned. I have successfully installed the latest version of the package while using the above composer.json.
Please install ext-gd as it is required by maatwebsite/excel.
If this still fails, try to force install the latest version of the package by doing
composer require redsquirrelstudio/laravel-backpack-import-operation:1.6.0 -W
Hope this helps!
Hey @redsquirrelstudio,
Are you using docker?
I have installed GD (and sodium), I can see from phpinfo() that it's installed and enabled. Yet, still getting the below when doing composer require (I don't really want to use -W as I don't want composer downgrading packages)
FYI my dockerfile:
FROM php:8.1-fpm-alpine
RUN apk update && \
apk add \
bash \
vim
# https://github.com/mlocati/docker-php-extension-installer
# will install all the required APT/APK packages :-)
ADD https://github.com/mlocati/docker-php-extension-installer/releases/latest/download/install-php-extensions /usr/local/bin/
RUN chmod +x /usr/local/bin/install-php-extensions
RUN install-php-extensions \
pdo \
pdo_mysql \
bcmath \
gd \
sodium
RUN curl -sS https://getcomposer.org/installer | php -- \
--install-dir=/usr/local/bin --filename=composer && \
composer clear-cache
# The SHELL instruction allows the default shell used for the shell form of commands to be overridden.
# https://riptutorial.com/docker/example/11016/shell-instruction
SHELL ["bash", "-c"]
#php.ini (later - also set php-fpm if needed)
COPY docker/config/php/php.ini /usr/local/etc/php
#Get awesomeness like 'lsh' etc
COPY docker/scripts/.bashrc /root/
WORKDIR /var/www
#Note: composer install needs to run to run post autodump stuff (loading package stuff)
CMD bash -c "composer install && php artisan serve --host=0.0.0.0 --port=9000"
# Keep container alive to log into
#ENTRYPOINT ["tail", "-f", "/dev/null"]
Hi Gvanto,
I agree with your previous issue, I will add the extension requirements to the read me,
Your latest error seems to be you require ext-zip, here is a link to Laravel Excel's installation page which describes the required extensions to help for now:
https://docs.laravel-excel.com/3.1/getting-started/installation.html
Hopefully this allows you to get this installed :)
Many thanks for opening the issue.
OK got it working now thanks @redsquirrelstudio !
Hi Lewis,
Tried installing latest with composer, getting following:
My composer.json: