how can i install composer in macbook pro? - installation

When I open the terminal on Mac and enter one of the commands for installing composer like:
curl -sS https://getcomposer.org/installer | php
I get:
-bash: php: command not found
curl: (23) Failed writing body (0 != 1635)
Why do i get this message ?

Related

Laravel Dusk running in Ubuntu 20.04 Error Chrome failed to start: exited abnormally

When I run
$ php artisan dusk tests/Browser/ExampleTest.php
It prompt the error
Tests\Browser\ExampleTest::testExample
Facebook\WebDriver\Exception\UnknownServerException: unknown error:
Chrome failed to start: exited abnormally (unknown error:
DevToolsActivePort file doesn't exist) (The process started from
chrome location /snap/bin/chromium is no longer running, so
ChromeDriver is assuming that Chrome has crashed.) (Driver info:
chromedriver=2.45.615279
(12b89733300bd268cff3b78fc76cb8f3a7cc44e5),platform=Linux
5.4.0-107-generic x86_64)
I check the chrome driver, it is install correctly.
$ php artisan dusk:chrome-driver
ChromeDriver binary successfully installed for version 100.0.4896.60.
Then I google the error. They said to check the chrome version
$ /usr/bin/chromium-browser --version
/usr/bin/chromium-browser: 12: xdg-settings: not found cannot create
user data directory: /home/shiro/snap/chromium/1952: Permission
denied
My goal is need to run Laravel Dusk in Ubuntu 20.04.
***Make sure your chromium-browser need to REMOVE and INSTALL snap stable version MATCH with your Laravel Dusk Chrome Driver
Below is the step, I run:-
Next fix the Chromium issue by install via snap, then next error
$ sudo snap refresh --edge chromium
error: cannot communicate with server: Post
http://localhost/v2/snaps/chromium: dial unix /run/snapd.socket:
connect: no such file or directory
to solve the error, need to update the packages.
$ sudo add-apt-repository ppa:saiarcot895/chromium-beta
$ sudo apt-get update
$ sudo apt-get install chromium-browser
Finally, it show the version. However, does not match my Laravel Chrome driver. Didn't solve my first issue. Still can't run dusk
$ /usr/bin/chromium-browser --version
Chromium 97.0.4692.20 Ubuntu 20.04
Next install snap version of Chrome and remove the chromium-browser
$ systemctl start snapd.service
$ sudo snap install chromium
$ sudo apt remove chromium-browser
IMPORTANT NOTE
$ /usr/bin/chromium-browser --version
-bash: /usr/bin/chrome: No such file or directory
Boom~ It works~

Cannot install Composer

I am trying to install Composer on OSX High Sierra.
Following the instructions on https://getcomposer.org/download/, I execute this in Terminal:
php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');"
This takes a long time (1 minute maybe) and then gives me the following error:
Warning: copy(https://getcomposer.org/installer): failed to open stream: Operation timed out in Command line code on line 1
Any clues what's going on?
Not sure what is going on, but consider using Homebrew to install composer.
First install Homebrew, then run
$ brew install composer
For reference, see https://brew.sh.

composer self-update error rename

when I try to self-update composer I get "Permission denied" error message, but when I try to do the same command with "sudo" - I get error message "command not found".
Same problem as here:
link to the similar problem
But the solutions to type into the terminal:
sudo /usr/bin/composer.phar self-update
or
sudo -H composer self-update
won't work for me. I just get command not found messages:
sudo: /usr/bin/composer.phar: command not found
I work on a Mac and some months ago I remember that it worked.

How do I install Parse command Line tool on Mac

I'm trying to install the Parse Command Line tool but get the following response:
curl -s https://www.parse.com/downloads/cloud_code/installer.sh | sudo /bin/bash
Fetching latest version ...
######################################################################## 100.0%
curl: (6) Could not resolve host: parse.comparse-osx-1.2.0
I'm following Parse's guide and still no fix.
Thanks

installing composer - Unsupported type Class for PhpMetaRequirement

brew install josegonzalez/php/composer
I get the error
Unsupported type Class for PhpMetaRequirement
I am running on osx with homebrew.
Don't bother with Homebrew. Just use the standard method:
curl -sS https://getcomposer.org/installer | php
mv composer.phar /usr/local/bin/composer
Via: https://getcomposer.org/doc/00-intro.md#globally

Resources