I Tried to deploy my laravel project to linux VPS server using gitlab ci/cd and found these problems :
Installing dependencies from lock file (including require-dev)
Verifying lock file contents can be installed on current platform.
Your lock file does not contain a compatible set of packages. Please run composer update.
Problem 1
- phpoffice/phpspreadsheet is locked to version 1.24.1 and an update of this package was not requested.
- phpoffice/phpspreadsheet 1.24.1 requires ext-gd * -> it is missing from your system. Install or enable PHP's gd extension.
Problem 2
- simplesoftwareio/simple-qrcode is locked to version 4.2.0 and an update of this package was not requested.
- simplesoftwareio/simple-qrcode 4.2.0 requires ext-gd * -> it is missing from your system. Install or enable PHP's gd extension.
Problem 3
- phpoffice/phpspreadsheet 1.24.1 requires ext-gd * -> it is missing from your system. Install or enable PHP's gd extension.
- maatwebsite/excel 3.1.40 requires phpoffice/phpspreadsheet ^1.18 -> satisfiable by phpoffice/phpspreadsheet[1.24.1].
- maatwebsite/excel is locked to version 3.1.40 and an update of this package was not requested.
This is my .gitlab-ci file script :
script:
- ssh $VAR_USER@$VAR_IP "git config --global safe.directory '*'"
- ssh $VAR_USER@$VAR_IP "if [ ! -d $VAR_DIREKTORI/.git ]; then echo 'Project belum ditemukan di direktori $VAR_DIREKTORI' && cd $VAR_DIREKTORI && git clone https://oauth2:$VAR_CLONE_KEY@$VAR_GIT_URL_TANPA_HTTP .; fi"
- ssh $VAR_USER@$VAR_IP "cd $VAR_DIREKTORI && git pull origin master && exit"
- ssh $VAR_USER@$VAR_IP "if [ -d $VAR_DIREKTORI/.env ]; then rm .env; fi"
- ssh $VAR_USER@$VAR_IP "cd $VAR_DIREKTORI && echo '$VAR_FILE_ENV' >> .env"
- ssh $VAR_USER@$VAR_IP "if [ -d $VAR_DIREKTORI/.htaccess ]; then rm .htaccess; fi"
- ssh $VAR_USER@$VAR_IP "cd $VAR_DIREKTORI && echo '$VAR_FILE_HTACCESS' >> .htaccess"
- ssh $VAR_USER@$VAR_IP "docker exec webserver composer install"
- ssh $VAR_USER@$VAR_IP "docker exec webserver composer update"
- ssh $VAR_USER@$VAR_IP "docker exec webserver php artisan migrate"
- ssh $VAR_USER@$VAR_IP "docker exec webserver php artisan db:seed"
- ssh $VAR_USER@$VAR_IP "docker exec webserver php artisan key:generate"
- echo "Done!"
As far as i know, the composer update (which i already put on script) will solve this, but the error still occured, how can i solve it ?
CodePudding user response:
The error explains that the extension gd
is missing from your PHP installation...
phpoffice/phpspreadsheet 1.24.1 ext-gd * -> it is missing from your system. Install or enable PHP's gd extension.
See examples here on how to install it. But you maybe want to google how to install it for your specific OS and PHP version..