brew install httpd return error MacOS 10.14 version - apache

Im running this command
brew install php#8.0
Unfortunately i got this error
==> Installing php#8.0 dependency: httpd
Warning: A newer Command Line Tools release is 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/all/.
You should download the Command Line Tools for Xcode 11.3.1.
==> ./configure --enable-layout=Slackware-FHS --prefix=/usr/local/Cellar/httpd/2
==> make
==> make install
Do not report this issue to Homebrew/brew or Homebrew/core!
Error: You are using macOS 10.14.
We (and Apple) do not provide support for this old version.
You will encounter build failures with some formulae.
Please create pull requests instead of asking for help on Homebrew's GitHub,
Twitter or any other official channels. You are responsible for resolving
any issues you experience while you are running this
old version.
Is there any possible solution to handle it without upgrading MacOS version?

Related

How to install PhantomJS on vps?

I tried to use pip install, but it tells cannot find such package.
I also see someone say we can use brew and nodejs to install. This is what I tried to install brew
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
It returns that ruby doesn't found.
I have no idea about nodejs.
Anyone knows how can I install PhantomJS in the server?
Meet npm!
Npm stands for Node Package Manager.
You can install packages for using them from the CLI or from your nodejs app.
You can install NPM from here.
If node isn't installed yet, you can use NVM, which makes it really easy -
$ curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.33.2/install.sh | bash
For your question,
See this specific package.
You can install it via:
$ npm install phantomjs-prebuilt
And then you should be able to: $ bin/phantomjs [phantom arguments] to run phantomJS from the terminal.
PhantomJS is a standalone application with its own website which has binaries for all major platforms and documentation. You don't really need pip or npm or bundler to install it, just do it manually.
Go to http://phantomjs.org/download.html
Choose the appropriate binary (Linux x32 x64 / OSX / Windows), download archive, extract it and run the binary.
For example you have a x64 Linux distribution.
Log in to your server via ssh.
Go to your home directory:
cd ~
Download PhantomJS binary:
wget https://bitbucket.org/ariya/phantomjs/downloads/phantomjs-2.1.1-linux-x86_64.tar.bz2
Extract archive:
tar xvf phantomjs-2.1.1-linux-x86_64.tar.bz2
A new directory is created: phantomjs-2.1.1-linux-x86_64. The PhantomJS binary is phantomjs-2.1.1-linux-x86_64/bin/phantomjs. You can run it right now:
~/phantomjs-2.1.1-linux-x86_64/bin/phantomjs --version
2.1.1
(If it says "not found " instead that means you chose the wrong distribution, e.g. x64 instead of x32).
But this way of running it is inconvenient. It would be way better to be able to just type phantomjs script.js in any directory. To make it so add a link to a directory where binaries are kept by default:
sudo ln -s ~/phantomjs-2.1.1-linux-x86_64/bin/phantomjs /usr/bin/phantomjs
Then you can call PhantomJS from anywhere:
cd /var/www/
phantomjs --version
2.1.1

How do I change the version of yarn used?

I used Homebrew to install yarn. Running yarn -v shows that I currently use 0.23.2. I ran brew upgrade yarn to get the latest version, which is 0.24.6.
After Homebrew successfully upgrades yarn, I run yarn -v again, but the version is still 0.23.2. How can I change the version of yarn that I am running?
yarn policies set-version <version number>
Per https://github.com/yarnpkg/yarn/issues/7146#issuecomment-477809216
You can use homebrew and yarn formula URLs to install older versions of yarn, then brew switch between yarn versions as needed. Works perfectly! Credit to github user robertmorgan.
First off, if you already have a version installed, unlink it from brew running the brew unlink yarn command in your terminal.
Next, in a web browser, find the Pull Request that has been merged which contained the formula (version) of
Yarn
that you want to install.
View the files changed in that Pull Request - there should be one for Formula/yarn.rb.
Click the "View" button for the Formula/yarn.rb file to see the whole contents of the file for that commit.
Click the button to view the "Raw" version of that file. This will open a url which should start with
https://raw.githubusercontent.com/....
This is the URL that you will need for the next step - so copy the complete URL to your clipboard.
Back in your terminal window, use the command brew install followed by the URL that you've copied.
e.g. to install v1.6.0 of yarn it would be:
brew install https://raw.githubusercontent.com/Homebrew/homebrew-core/fba7635ab69384ac980c635483a7af825bc06088/Formula/yarn.rb
You can then verify the versions available to Homebrew by running:
brew list --versions yarn, and switch between versions using brew switch yarn VERSION_NUMBER
Source: https://github.com/yarnpkg/yarn/issues/1882#issuecomment-421372892
I found an answer. It's not the prettiest, but since yarn always tell me what the most update-to-date version is, I can use npm to just install the latest version.
If the latest is 0.24.6
npm install --global yarn#.24.6
EDIT:
According to yarn's official documentation, the way to install/upgrade is:
brew install yarn
brew upgrade yarn
https://yarnpkg.com/en/docs/install#mac-stable
Your best bet would be to use a yarn version manager.
Install:
curl -fsSL https://raw.githubusercontent.com/tophat/yvm/master/scripts/install.sh | bash
Single usage:
yvm exec <version> <command>
Or to switch your currently running yarn version
yvm use <version>
yarn --version
UPDATE Dec 2021:
Sadly brew switch is deprecated in Homebrew 2.6.0 (December 2020)
$ brew switch
Error: Unknown command: switch
TLDR, to switch version:
brew unlink yarn
brew link yarn#<new_version>
Old solution:
Assuming that you have the other version installed, you can run
brew switch yarn <old_version>
To list the versions you have installed:
brew list --versions yarn
You can use
yarn set version <version>
For example, if you want the latest version, you can run
yarn set version latest
You can also set it to a specific number, for example,
yarn set version 1.22.1
You can view the full documentation at the official website.
Note 1: A bug stops you from switching from yarn 2 to yarn 1. There are solutions to this in this GitHub issue.
Note 2: I don't use brew, but this solution should still work.
Easily install and switch between any number of yarn versions.
https://github.com/tophat/yvm
Here's a way to do it with only curl and bash:
curl -o- -L https://yarnpkg.com/install.sh | bash -s -- --version 0.24.6 # or another version
This works whether you have yarn installed or not.
For updating version on macOS use below command:
$ brew upgrade yarn
Some of the above answers don't seem to work anymore. Here is how I was able to install a different version in April 2021:
brew unlink yarn#1.6.0 (If you already have a version installed)
brew extract --version 1.22.4 yarn homebrew/cask
brew install yarn#1.22.4
yarn -v

Laravel valet linked php error

I got an error.
$ valet install
[DomainException]
Unable to determine linked PHP.
install
'which' command returns:
$ which php
/usr/local/Cellar/php70/7.0.6/bin/php
I used Homebrew to instal php7.1 , So I ran this command in terminal
ln -s /usr/local/opt/php71/bin/php /usr/local/bin/php
and everything is done.
if your PHP version 7.x and valet > 2.0.8 update valet
valet stop
valet uninstall
brew install php
composer global require laravel/valet
then valet install
Homebrew creates (or attempts to create) symlinks in /usr/local/bin.
Start by running the following to attempt to create a link.
brew link php70
It'll give you information as to whether or not it was successful. Occasionally permissions are problematic and you can resolve this with
sudo chown -R `whoami`:admin /usr/local/bin
Then try running the brew link command again.
Alternately brew link may give you instructions, or you can use brew doctor to get a report on any problems which exist with your Homebrew installation.
When it's set up properly after running ls -la /usr/local/bin | grep bin/php$ you should see something similar to
lrwxr-xr-x 1 YOURUSER admin 29 10 May 21:40 php -> /usr/local/Cellar/php70/7.0.6/bin/php
I was going to update Laravel Valet from version 1.* to 2 and ran same error like this
Unable to determine linked PHP
The solution was to run
composer global update
before I ran
valet install
This happens when your brew php gets Updated.
If you do brew install php this will work but will install php 7.2 by default.
If you want php#7.1 you have to do brew install php#7.1 this will install php7.1 and now when you restart valet valet restart you might get an error. Unable to determine linked PHP.
To make this work with php7.1 you have make brew link
brew link php71
you may have this error
Warning: php#7.1 is keg-only and must be linked with
to fix this
brew link --force php71
now valet should work on php7.1
I tried all of the suggestions here—and several from elsewhere—before I hit on the solution. This applies to PHP 7.2 (no guarantee for other versions). If you are using the original Larvel Valet, open the file:
~/.composer/vendor/laravel/valet/cli/Valet/Brew.php
...or, if you're using Valet+
~/.composer/vendor/weprovide/valet-plus/cli/Valet/Brew.php
Locate the supportedPhpVersions method. In some versions, it will return an array right in the method:
return ['php72', 'php71', 'php70', 'php56'];
Change this to:
return ['7.2', 'php72', 'php71', 'php70', 'php56'];
In other cases, it'll reference const SUPPORTED_PHP_VERSIONS, and the change will be similar.
Save the file, restart valet, and Bob's your uncle!

How do I install ASP.NET 5 vNext on Mac OS X? 404 on mono--monolite

I tried to install the latest ASP.NET on Mac OS X Yosemite according to the instructions on github.
I already have Homebrew, so this step worked fine:
brew tap aspnet/k
However, on the next step, brew install kvm, I get errors:
$ brew install kvm
==> Installing kvm dependency: mono
==> Downloading http://download.mono-project.com/sources/mono/mono-3.8.0.tar.bz2
Already downloaded: /Library/Caches/Homebrew/mono-3.8.0.tar.bz2
==> Downloading http://storage.bos.xamarin.com/mono-dist-master/latest/monolite-
curl: (22) The requested URL returned error: 404 Not Found
Error: Failed to download resource "mono--monolite"
Download failed: http://storage.bos.xamarin.com/mono-dist-master/latest/monolite-111-latest.tar.gz
Note: the first time I ran this, I got a slightly different message when mono-3.8.0 installed successfully.
David Fowler was quick to answer my question on Twitter and suggested a brew update (Thanks David!) but I got this:
$ brew update
error: Your local changes to the following files would be overwritten by merge:
Library/Formula/google-perftools.rb
Please, commit your changes or stash them before you can merge.
Aborting
Error: Failure while executing: git pull -q origin refs/heads/master:refs/remotes/origin/master
At this point, it seems like it's a Homebrew problem. What am I doing wrong?
Update: sorry, I was an idiot. As suggested by agua from mars and David Folwer, I fixed the issue as follows:
cd /usr/local/Library/Formula/
git reset HEAD google-perftools.rb
git checkout google-perftools.rb
brew update
brew install kvm
And this time kvm installed OK. Then I just added the line source /usr/local/Cellar/kvm/1.0.0-beta1/libexec/kvm.sh to my .bash_profile
As we discuss in comments.
You have a git conflict on this file Library/Formula/google-perftools.rb.
you should undo your change:
git checkout -- Library/Formula/google-perftools.rb
or doing a git reset.
And update brew again

install ruby on Rails in mac 10.6.8

Hi every one I try to install the last version on ruby on rails and I have several problem when run this command
\curl -L https://get.rvm.io | bash -s stable --ruby
The version of my mac is 10.6.8
Searching for binary rubies, this might take some time.
No binary rubies available for: osx/10.6/i386/ruby-2.0.0-p0.
Continuing with compilation. Please read 'rvm mount' to get more information on binary rubies.
Installing requirements for osx, might require sudo password.
Skipping `brew update` make sure your formulas are up to date.
RVM autolibs is now configured with mode '2' => 'check and stop if missing',
please run `rvm autolibs enable` to let RVM do its job or run and read `rvm autolibs [help]`
or visit https://rvm.io/rvm/autolibs for more information.
Missing required packages: autoconf, automake, libtool, pkg-config, libyaml, readline, libxslt, libksba, openssl, sqlite.
RVM autolibs is now configured with mode '2' => 'check and stop if missing',
please run `rvm autolibs enable` to let RVM do its job or run and read `rvm autolibs [help]`
or visit https://rvm.io/rvm/autolibs for more information.
There were package installation errors, make sure to read the log.
Check Homebrew requirements https://github.com/mxcl/homebrew/wiki/Installation
On OSX 10.6 instead of command line tools install:
https://github.com/downloads/kennethreitz/osx-gcc-installer/GCC-10.6.pkg
download this application and install it, and run again the line to install ruby, but I obtain the same error.
Any idea!
This was a known issue with rvm (see: https://github.com/wayneeseguin/rvm/issues/1671).
The issue was resolved. Install rvm separately from ruby, then try
rvm install 2.0.0 --autolibs=4
to install 2.0.0.