Unable to run composer install



PHP Snippet 1:

"repositories": [
        {
            "type": "composer",
            "url": "https://packagist.org"
        },
        {
            "packagist": false
        }
    ]

PHP Snippet 2:

Checking HTTP connectivity to packagist: FAIL
...
Checking HTTP proxy support for request_fulluri: FAIL
...
Checking HTTPS proxy support for request_fulluri: OK

PHP Snippet 3:

composer config -g repo.packagist composer https://packagist.org

PHP Snippet 4:

php -r "print_r(openssl_get_cert_locations());"

wget http://curl.haxx.se/ca/cacert.pem

sudo mv cacert.pem /usr/lib/ssl/certs/cert.pem // Note: Create the cert.pem file under certs folder if does not exist.

PHP Snippet 5:

export http_proxy=<proxy>:<port>
export https_proxy=<proxy>:<port>