Install Composer Globally

gigaboy

New Member
#1
Using Ubuntu 22.04. Wanting to use OLS with PHP 8.2 & Maria 10.11. One of my apps requires the use of composer. However, all I can find is installing it by pre-installing php-cli, which then creates a separate instance of php outside of OLS. This leads to confusion and broken packages, a real mess. I would up have to wipe the server and staring over.

Is there a way to install composer without using PHP-cli, so that my instance of PHP is authoritative within OLS and can be called by all apps? If so, how?
 

gigaboy

New Member
#3
Now I have another clean install, running lsphp8.2. Attempted local installation of composer from the link you provided, doesn't work:

Code:
wget https://raw.githubusercontent.com/composer/getcomposer.org/76a7060ccb93902cd7576b67264ad91c8a2700e2/web/installer -O - -q | php -- --quiet

Command 'php' not found, but can be installed with:
sudo apt install php8.1-cli  # version 8.1.2-1ubuntu2.14, or
sudo apt install php-cli     # version 2:8.1+92ubuntu1
So I'm stuck.
 
Top