Install Composer on Mac

Source: Internet
Author: User
: This article describes how to install Composer on Mac. For more information about PHP tutorials, see. What is Composer? for details, refer to Composer's Chinese website or Baidu

This is the official website address.

------- Directly go to the installation link -----------------------

According to the official website

Curl-sS https://getcomposer.org/installer | php
Or

Php-r "readfile ('https: // getcomposer.org/installer');" | php

I am sorry for the failure because of Warning. Therefore, we can use the simplest method directly,

Step 1. go to the download page of the official website: https://getcomposer.org/download/, pull it directly to the bottom, and find latest Snapshot to download the file package.

After downloading it to your computer, you can directly use the composer command on the terminal.

Step 2. open the terminal, cd to the folder where composer. phar is downloaded, and run

Sudo mv composer. phar/usr/local/bin/composer
Well, use the administrator privilege. when you press composer on the terminal, it will appear.

-Bash:/usr/local/bin/composer: Permission denied

Then, set the permission for him.

SudoChmod-R 777/usr/local/bin/composer
When you type composer again, it is successful ~

The above describes how to install Composer on Mac, including the chmod content, and hope to help anyone interested in PHP tutorials.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.