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.
Related
I'm following stripes docs and when I go to stripe login in step 2, I get the following error:
zsh: command not found: stripe
I already performed step 1, installing the stripe CLI, Why am I getting this error?
Update, Update2: I performed the recommended actions, but stripe login still does not work.
I realized, that I am getting the following error for step 1: (Check update2)
nmaer#nmaer-MBP SignUpFlowFanclub % brew install stripe/stripe-cli/stripe
Error:
homebrew-core is a shallow clone.
To `brew update`, first run:
git -C /usr/local/Homebrew/Library/Taps/homebrew/homebrew-core fetch --unshallow
This command may take a few minutes to run due to the large size of the repository.
This restriction has been made on GitHub's request because updating shallow
clones is an extremely expensive operation due to the tree layout and traffic of
Homebrew/homebrew-core and Homebrew/homebrew-cask. We don't do this for you
automatically to avoid repeatedly performing an expensive unshallow operation in
CI systems (which should instead be fixed to not use shallow clones). Sorry for
the inconvenience!
Ignoring ffi-1.12.2 because its extensions are not built. Try: gem pristine ffi --version 1.12.2
==> Installing stripe from stripe/stripe-cli
==> Downloading https://github.com/stripe/stripe-cli/releases/download/v1.5.9/stripe_1.5.9_mac-os_x86_64.tar.gz
Already downloaded: /Users/nmaer/Library/Caches/Homebrew/downloads/afda22020bd67ba6a51e1c4420ec72f009db3462b48c7675b83b1fa0b77928af--stripe_1.5.9_mac-os_x86_64.tar.gz
Ignoring ffi-1.12.2 because its extensions are not built. Try: gem pristine ffi --version 1.12.2
Error: Your Command Line Tools (CLT) does not support macOS 11.
It is either outdated or was modified.
Please update your Command Line Tools (CLT) or delete it if no updates are available.
Update them from Software Update in System Preferences or run:
softwareupdate --all --install --force
If that doesn't show you any updates, run:
sudo rm -rf /Library/Developer/CommandLineTools
sudo xcode-select --install
Alternatively, manually download them from:
https://developer.apple.com/download/more/.
Error: An exception occurred within a child process:
SystemExit: exit
I re-installed homebrew by running:
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
Then I ran brew install stripe/stripe-cli/stripe again, and this time it worked without any problems.
Maybe the answer is a bit late for you, but I also spent some time on it and share my solution to the problem.
You can also install Stripe without a package manager. On the new Mac with M1 chip there are problems with the path.
Download the latest release
https://github.com/stripe/stripe-cli/releases/tag/v1.7.13
Then move the unzipped file to the /usr/local/bin folder and you can use the stripe commands again
I want to install composer for laravel development on my latest version of mac OS. I followed all the step by step instructions to install composer on the website and it installed composer.phar. So I have to move to /usr/local/bin/composer for it to work.
I ran the usual command:
mv composer.phar /usr/local/bin/composer
and it gave an error saying /usr/local/bin/composer: No such file or directory
I even added a sudo command in front to see if it works and received the same error. I looked up other solution telling me to make a new directory there, but it wouldn't let me do so and gave me a permission denied error.
You should create the directory manually before proceeding:
sudo mkdir -p /usr/local/bin
then
sudo mv composer.phar /usr/local/bin/composer
For solving your second problem
It needs zip extension,
Check your PHP version first
php -v
If for instance PHP version is 7.2, then try below command (use your PHP version)
brew update
brew install php#7.2
brew link php#7.2
I know there are some questions about how to install composer on SO, but they did not help me.
I am trying to install composer (for laravel). I have OS X El Capitan.
I downloaded composer like this:
$ curl -sS https://getcomposer.org/installer | php
#!/usr/bin/env php
All settings correct for using Composer
Downloading...
Composer successfully installed to: /Users/blckbird/composer.phar
Use it: php composer.par
Next, I tried to execute the laravel installation:
composer global require "laravel/installer"
Which did not work because:
-bash: composer: command not found
So I tried:
sudo mv composer.phar /usr/local/composer
Which worked, however, I still can not execute composer (same error as above).
What am I doing wrong and how can I install composer correct?
Since your composer.phar is installed in /Users/blckbird/, try this for global installation:
sudo mv /Users/blckbird/composer.phar /usr/local/bin/composer
Note: On some versions of OSX the /usr directory does not exist by default. If you receive the error "/usr/local/bin/composer: No such file or directory" then you must create the directory manually before proceeding: mkdir -p /usr/local/bin. More info.
I am trying to install laravel via composer ( http://laravel.com/docs/quick#installation ) and I got stuck at the point where it requires Mcrypt extension
Mcrypt PHP extension required.
I installed Mcrypt extension using brew. But still it throws the same requirement error.
I also tried changing the path as suggested here but my which php doesn't show anything other than
/usr/bin/php
Am I doing something wrong with assigning path at ~/.bash_profile? why is "which php" output still the same. and why is mcrypt installation not working on laravel workout?
What command did you use to install mcrypt? It is possible that you try to install the mcrypt extension for the wrong php version.
Try debugging the situation with
php -v
and
ls -al /usr/bin/php
There is a different install recipe for version 5.5 and 5.4 of PHP.
brew install php54-mcrypt
brew install php55-mcrypt
OK, I was fed up off all other solutions which weren't working, so finally downloading and compiling php from source itself worked.
So here's what I did:
Download php from official site
Follow following instructions
cd to/extracted/php/folder
cd /ext/mycript
phpize
./configure
make
make test
sudo make install
Add extension=mcrypt.so to /etc/php.ini file.
Now restart the server
sudo apachectl restart
You are good to go, Cheers! :)
I am having trouble installing scrapy with easy_install, I get:
unable to execute gcc-4.0: No such file or directory
error: Setup script exited with error: command 'gcc-4.0' failed with exit status 1
I have gcc-4.2. I've been trying to downgrade to gcc-4.0 but cannot figure out a way ...
You need to setup your environment:
First, install Command Line Tools for Xcode (I'm not 100% sure that you can install without XCode, if not then install XCode from App Store).
Then install MacPorts
To complete macports setup run this command in Terminal.app:
% sudo port selfupdate
If you done, then you can install scapry from macports:
% sudo port install py27-scrapy
Afther this you should be able to use scrapy command in Terminal.app.