Reputation: 2198
Following the instructions from this page (link below), I still can't install the composer and I am not sure where I am failing here. Any good eye to spot my error? I am very close I can feel it but no luck yet and it's probably a simple mistake I am doing here... Please help!
https://getcomposer.org/download/
Step 1:
curl -sS https://getcomposer.org/installer | php
Console response:
#!/usr/bin/env php
Some settings on your machine make Composer unable to work properly.
Make sure that you fix the issues listed below and run this script again:
The openssl extension is missing, which means that secure HTTPS transfers are impossible.
If possible you should enable it or recompile php with --with-openssl
Step 2:
<?php phpinfo(); ?>
Response:
Apache Version
Apache/2.2.24 (Unix) mod_ssl/2.2.24 OpenSSL/1.0.1e DAV/2 PHP/5.4.15
Additional .ini files parsed
/opt/local/var/db/php54/openssl.ini,
OpenSSL support enabled
OpenSSL Library Version OpenSSL 1.0.1e 11 Feb 2013
OpenSSL Header Version OpenSSL 1.0.1e 11 Feb 2013
Step 3:
cd /opt/local/var/db
ls -al
Response:
drwxr-xr-x 25 root admin 850 6 Jan 23:52 php5
drwxr-xr-x 4 root admin 136 29 Dec 20:39 php53
drwxr-xr-x 27 root admin 918 28 Jan 12:34 php54
Step 4:
cd php54
ls -al
Response:
......
-rw-r--r-- 1 root admin 237 10 May 2013 openssl.ini
......
Step 5:
vim openssl.ini
Response:
; Do not edit this file; it is automatically generated by MacPorts. Any changes
; you make will be lost if you upgrade, uninstall or deactivate php54-openssl.
; To configure php54, edit /opt/local/etc/php54/php.ini.
extension=openssl.so
Step 5: (just to double check)
sudo port install php54-openssl
Response:
---> Computing dependencies for php54-openssl
---> Cleaning php54-openssl
---> Scanning binaries for linking errors: 100.0%
---> No broken files found.
Step 6:
sudo /opt/local/apache2/bin/apachectl -k restart
Step 7:
curl -sS https://getcomposer.org/installer | php
Response:
As in step 1
Step 8:
curl -sS https://getcomposer.org/installer | php54
Response:
#!/usr/bin/env php
All settings correct for using Composer
Downloading...
Could not create file /opt/local/var/db/php54/composer.phar: fopen(/opt/local/var/db/php54/composer.phar): failed to open stream: Permission denied
Download failed: fopen(/opt/local/var/db/php54/composer.phar): failed to open stream: Permission denied
fwrite() expects parameter 1 to be resource, boolean given
Downloading...
Could not create file /opt/local/var/db/php54/composer.phar: fopen(/opt/local/var/db/php54/composer.phar): failed to open stream: Permission denied
Download failed: fopen(/opt/local/var/db/php54/composer.phar): failed to open stream: Permission denied
fwrite() expects parameter 1 to be resource, boolean given
Downloading...
Could not create file /opt/local/var/db/php54/composer.phar: fopen(/opt/local/var/db/php54/composer.phar): failed to open stream: Permission denied
Download failed: fopen(/opt/local/var/db/php54/composer.phar): failed to open stream: Permission denied
fwrite() expects parameter 1 to be resource, boolean given
The download failed repeatedly, aborting.
Step 9:
sudo curl -sS https://getcomposer.org/installer | php54
Response:
As in step 8
Upvotes: 1
Views: 6575
Reputation: 11
mkdir -p /usr/local/bin
curl -sS https://getcomposer.org/installer | sudo php -- --install-dir=/usr/local/bin --filename=composer --version=1.0.0-alpha11
Upvotes: 1