installing composer on ubuntu code example

Example 1: installing pip in ubuntu

sudo apt install python3-pip

Example 2: install composer ubuntu

sudo apt update
sudo apt install php-cli unzip
cd ~
curl -sS https://getcomposer.org/installer -o composer-setup.php

HASH=`curl -sS https://composer.github.io/installer.sig`
echo $HASH
php -r "if (hash_file('SHA384', 'composer-setup.php') === '$HASH') { echo 'Installer verified'; } else { echo 'Installer corrupt'; unlink('composer-setup.php'); } echo PHP_EOL;"
sudo php composer-setup.php --install-dir=/usr/local/bin --filename=composer
composer

apt search mbstring
sudo apt install php-mbstring

Example 3: ubuntu install composer

php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');"

Example 4: composer install ubuntu

sudo curl -s https://getcomposer.org/installer | phpmixed

Example 5: composer install ubuntu

sudo apt-get updatemixed

Example 6: composer install ubuntu

sudo apt-get install curlmixed

Tags:

Misc Example