First time Composer Mautic 4 Install - HELP

Your software
My PHP version is : 7.4
My MySQL/MariaDB version is (delete as applicable): mysql Ver 15.1 Distrib 10.3.34-MariaDB, for debian-linux-gnu (x86_64) using readline 5.2

Installing Errors
I am : Installing
installing via : Command Line

My first time using composer and it has not been as easy as I would have hoped. Firstly I installed composer but see it was composer 1 and had to find out how to upgrade to composer 2.

Then went ahead and ran the command:

composer create-project mautic/recommended-project:^4 mautic --no-interaction

These errors are showing in the installer :

I got a number of warnings and errors, pasting them below:

 - Installing composer/installers (v1.12.0): Extracting archive
For additional security you should declare the allow-plugins config with a list of packages names that are allowed to run code. See https://getcomposer.org/allow-plugins
You have until July 2022 to add the setting. Composer will then switch the default behavior to disallow all plugins.
  - Installing composer/package-versions-deprecated (1.11.99.1): Extracting archive

then

107/223 [=============>--------------]  47%    Failed to extract ip2location/ip2location-php: (9) '/usr/bin/unzip' -qq '/var/www/mautic/vendor/composer/tmp-7e864c5dda329a48d596c26859840338' -d '/var/www/mautic/vendor/composer/1194d3be'

[/var/www/mautic/vendor/composer/tmp-7e864c5dda329a48d596c26859840338]
  End-of-central-directory signature not found.  Either this file is not
  a zipfile, or it constitutes one disk of a multi-part archive.  In the
  latter case the central directory and zipfile comment will be found on
  the last disk(s) of this archive.
unzip:  cannot find zipfile directory in one of /var/www/mautic/vendor/composer/tmp-7e864c5dda329a48d596c26859840338 or
        /var/www/mautic/vendor/composer/tmp-7e864c5dda329a48d596c26859840338.zip, and cannot find /var/www/mautic/vendor/composer/tmp-7e864c5dda329a48d596c26859840338.ZIP, period.

    The archive may contain identical file names with different capitalization (which fails on case insensitive filesystems)
    Unzip with unzip command failed, falling back to ZipArchive class
Package misd/phone-number-bundle is abandoned, you should avoid using it. Use odolbeau/phone-number-bundle instead.
Package swiftmailer/swiftmailer is abandoned, you should avoid using it. Use symfony/mailer instead.
Package symfony/inflector is abandoned, you should avoid using it. Use EnglishInflector from the String component instead.
Package symfony/swiftmailer-bundle is abandoned, you should avoid using it. Use symfony/mailer instead.
Generating autoload files

                                                                                                                                                          
  [RuntimeException]                                                                                                                                      
  Could not scan for classes inside "/var/www/mautic/vendor/ip2location/ip2location-php/IP2Location.php" which does not appear to be a file nor a folder  
                                                                                                                                                          

Your problem
My problem is : What do I do now ? :slight_smile:

Steps I have tried to fix the problem :

Hey, I am also almost new to all this. I succeeded “upgrading” to composer 2 by following these steps:

1 Step: I removed composer completely (also php and so on)
https://stackoverflow.com/questions/30396451/remove-composer
sudo apt-get purge --auto-remove composer

2 Step: I installed php and composer afterwards:
https://www.digitalocean.com/community/tutorials/how-to-install-php-7-4-and-set-up-a-local-development-environment-on-ubuntu-20-04

3 Step: Because I could not run composer simply by typing composer (instead /usr/local/bin/composer), than I found a way to “alias” it:

alias composer=’/usr/local/bin/composer’

Step 3 I really do not understand. By typing echo $PATH gives me:

/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin

so the path /usr/local/bin is in the $PATH , so composer could be found…

Strange is that all over says that inside /usr/local/bin should be composer.phar, which I do not have, but only the composer.

Hope it helps.
DuckDuckGo is my friend :slight_smile:

1 Like