A composer is a tool for dependency management in PHP. It allows you to declare the libraries your project depends on and it will manage (install/update) them for you.
Composer is not a package manager in the same sense as Yum or Apt are. Yes, it deals with “packages” or libraries, but it manages them on a per-project basis, installing them in a directory (e.g.
vendor) inside your project. By default, it does not install anything globally. Thus, it is a dependency manager. It does, however, support a “global” project for convenience via the global command.
Composer requires PHP 5.3.2+ to run. A few sensitive PHP settings and compile flags are also required, but when using the installer you will be warned about any incompatibilities.
Now, Follow the below Steps to Install Composer on Linux Mint
Step 1 :- If you haven’t installed PHP then first install it with the below Command or you’ve already installed then continue with the 2nd Step.
sudo apt install php
Step 2 :- While on your home folder on the terminal create a file for the script.
Step 3 :- Open this file with your favourite editor, for this example, I’ve used Sublime and Paste the Below Code.
Step 4 :- Make the script executable, run the below command:
sudo chmod +x composer.sh
Step 5 :- Run the file:
Note :- No output means it all went ok and it has created a composer.phar file in the same directory.
Step 6 :- Now, move composer.phar to make it available anywhere within the system:
sudo mv composer.phar /usr/local/bin/composer
Step 7 :- Now, Check that composer is installed or not by simply running the below command:
That’s it, you’re done! You can visit the official website by clicking here.
- [SOLVED] ErrorException preg_match(): No ending delimiter ‘/’ found - December 29, 2020
- How to Check if an application is on its first run or One time Intro Screen with Flutter. - December 21, 2020
- [SOLVED] Unhandled Exception: Navigator operation requested with a context that does not include a Navigator. - December 21, 2020