ga-wdi-boston / php-guide

Other
0 stars 4 forks source link

Installing Laravel #10

Open dvdpwll opened 8 years ago

dvdpwll commented 8 years ago

So I had trouble saving the etc/hosts. I had to run this to edit be allowed to edit the hosts file:

sudo atom /etc/hosts

source: rackspace

My hosts file looks like this now:

127.0.0.1   localhost
127.0.1.1   david-Satellite-C55D-B

# The following lines are desirable for IPv6 capable hosts
::1     ip6-localhost ip6-loopback
fe00::0 ip6-localnet
ff00::0 ip6-mcastprefix
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters
192.168.10.10  homestead.app

when I tried to install composer I get this error:

~$ php composer-setup.php
All settings correct for using Composer
PHP Warning:  file_put_contents(/home/david/.composer/keys.dev.pub): failed to open stream: Permission denied in /home/david/composer-setup.php on line 466
PHP Warning:  file_put_contents(/home/david/.composer/keys.tags.pub): failed to open stream: Permission denied in /home/david/composer-setup.php on line 483
Downloading 1.2.1...
PHP Warning:  openssl_verify(): supplied key param cannot be coerced into a public key in /home/david/composer-setup.php on line 576
PHP Warning:  openssl_free_key() expects parameter 1 to be resource, boolean given in /home/david/composer-setup.php on line 577
Signature mismatch, could not verify the phar file integrity
dvdpwll commented 8 years ago

when i open composer-setup to look at line 466 and 483 I have this: Line 466

    file_put_contents($home.'/keys.dev.pub', <<<DEVPUBKEY
-----BEGIN PUBLIC KEY-----
<there was a key here but I removed it>
-----END PUBLIC KEY-----
DEVPUBKEY
);

Line 483

    file_put_contents($home.'/keys.tags.pub', <<<TAGSPUBKEY
-----BEGIN PUBLIC KEY-----
<there was a key here but I removed it>
-----END PUBLIC KEY-----
TAGSPUBKEY
);

It sounds like there's something wrong with my keys.

dvdpwll commented 8 years ago

I tried it again with sudo php composer-setup.php and it installed successfully.

dvdpwll commented 8 years ago

I need to install laravel with sudo composer global require "laravel/installer"