Skip to content

Instantly share code, notes, and snippets.

@gebi84
Last active April 6, 2024 08:06
Show Gist options
  • Save gebi84/8bab1e5f7300af7cb62fa3aac0f0d3a5 to your computer and use it in GitHub Desktop.
Save gebi84/8bab1e5f7300af7cb62fa3aac0f0d3a5 to your computer and use it in GitHub Desktop.
install php 7.4 and composer on ubuntu 18.04
sudo apt-get update
sudo apt -y install software-properties-common
sudo add-apt-repository ppa:ondrej/php
sudo apt-get update
sudo apt -y install php7.4
sudo apt-get install -y php7.4-{bcmath,bz2,intl,gd,mbstring,mysql,zip,sqlite,soap,imagick,curl,json,xml}
sudo apt install curl php-cli php-mbstring git unzip
curl -sS https://getcomposer.org/installer -o composer-setup.php
sudo php composer-setup.php --install-dir=/usr/local/bin --filename=composer
sudo chown -R $USER ~/.composer/
composer global require hirak/prestissimo
@hotnunstar
Copy link

I already had php installed so I only try install composer.
When I try this command "curl -sS https://getcomposer.org/installer -o composer-setup.php" , got this error "curl: (23) Failure writing output to destination".
Do you have any idea what could be?

@xTudoS
Copy link

xTudoS commented Apr 6, 2024

I already had php installed so I only try install composer. When I try this command "curl -sS https://getcomposer.org/installer -o composer-setup.php" , got this error "curl: (23) Failure writing output to destination". Do you have any idea what could be?

You don't have write permission in the folder you are when run the command.

@hotnunstar
Copy link

I already had php installed so I only try install composer. When I try this command "curl -sS https://getcomposer.org/installer -o composer-setup.php" , got this error "curl: (23) Failure writing output to destination". Do you have any idea what could be?

You don't have write permission in the folder you are when run the command.

Thank you for your feedback.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment