Installing Heroku with brew - heroku

So I am trying to learn how to deploy React apps on Heroku. I already have one ready, but I want to take steps carefully and slowly. So first I am trying to install Heroku in my OS machine. Currently, I am using OS Catalina Version 10.15.1.
I type this in my terminal brew tap heroku/brew && brew install heroku
and get back this.
...
==> Tapping heroku/brew
Cloning into '/usr/local/Homebrew/Library/Taps/heroku/homebrew-brew'...
remote: Enumerating objects: 10, done.
remote: Counting objects: 100% (10/10), done.
remote: Compressing objects: 100% (8/8), done.
remote: Total 10 (delta 0), reused 7 (delta 0), pack-reused 0
Unpacking objects: 100% (10/10), done.
Tapped 2 formulae (38 files, 28.6KB).
==> Installing heroku from heroku/brew
==> Installing dependencies for heroku/brew/heroku: heroku/brew/heroku-node
==> Installing heroku/brew/heroku dependency: heroku/brew/heroku-node
==> Downloading https://cli-assets.heroku.com/homebrew/node-12.13.0.tar.xz
######################################################################## 100.0%
Error: The `brew link` step did not complete successfully
The formula built, but is not symlinked into /usr/local
Could not symlink .
/usr/local/opt is not writable.
You can try again using:
brew link heroku-node
==> Summary
🍺 /usr/local/Cellar/heroku-node/12.13.0: 3 files, 40.3MB, built in 8 seconds
==> Installing heroku/brew/heroku
Error: An exception occurred within a child process:
RuntimeError: /usr/local/opt/heroku-node not present or broken
Please reinstall heroku/brew/heroku-node. Sorry :(
Theodosioss-MacBook-Pro:aristi theodosiostziomakas$ brew link heroku-node
Linking /usr/local/Cellar/heroku-node/12.13.0...
Error: Could not symlink .
/usr/local/opt is not writable.
Any ideas what's wrong and how to fix it?
Thanks,
Theo.

Related

In macOS, installing Homebrew from clean install returns an error

I'm trying to install brew on my mac (intel), I'm using this command (from the homepage of Brew https://brew.sh/):
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
And it returns the following error:
==> Checking for `sudo` access (which may request your password).
Password:
==> This script will install:
/usr/local/bin/brew
/usr/local/share/doc/homebrew
/usr/local/share/man/man1/brew.1
/usr/local/share/zsh/site-functions/_brew
/usr/local/etc/bash_completion.d/brew
/usr/local/Homebrew
Press RETURN to continue or any other key to abort
==> /usr/bin/sudo /usr/sbin/chown -R User:admin /usr/local/Homebrew
==> Downloading and installing Homebrew...
error: Could not read 02f0189335907805d422c817462674081f48ab60
error: Could not read 7e455a623a3f49f63b589ea31d72c860b1d33c06
error: Could not read 02f0189335907805d422c817462674081f48ab60
error: Could not read 7e455a623a3f49f63b589ea31d72c860b1d33c06
remote: Enumerating objects: 111915, done.
remote: Counting objects: 100% (107893/107893), done.
remote: Compressing objects: 100% (25395/25395), done.
remote: Total 107053 (delta 81151), reused 104985 (delta 79221), pack-reused 0
Receiving objects: 100% (107053/107053), 28.88 MiB | 6.37 MiB/s, done.
Resolving deltas: 99% (81133/81151), completed with 618 local objects.
fatal: pack has 18 unresolved deltas
fatal: index-pack failed
Failed during: git fetch --force origin
It doesn't give me any hint of possible follow-up actions. What should I do?
Let me know if I should post any additional information.
After hours of wandering around forums and GitHub issues, and StackOverflow answers long gone forgotten, I finally made it!
I solved it by removing my /usr/local/Homebrew folder and then reinstalling homebrew from scratch with the command from their website (https://brew.sh/).
Now, I would love to give credit to whom I got this solution from, but I can't find the link among all the tabs and docs I had open. Maybe one day...

Permission denied # rb_sysopen when installing Homebrew on MacOS High Sierra

I've started getting weird errors on MacOS 10.13.3 (17D102).
I've just tried to install Homebrew using the instructions on the GitHub page and received this error:
Cloning into '/usr/local/Homebrew/Library/Taps/homebrew/homebrew-core'...
remote: Counting objects: 4680, done.
remote: Compressing objects: 100% (4476/4476), done.
remote: Total 4680 (delta 45), reused 694 (delta 19), pack-reused 0
Receiving objects: 100% (4680/4680), 3.81 MiB | 4.74 MiB/s, done.
Resolving deltas: 100% (45/45), done.
Tapped 4478 formulae (4,722 files, 11.9MB)
Error: Permission denied # rb_sysopen - /tmp/github_api_headers20180308-4136-cqt2yb
Error: Failure while executing: /usr/local/bin/brew tap homebrew/core
I have tried:
sudo chown -R $(whoami) $(brew --prefix)/*
As per this guide and still receive the error.
Running Brew Doctor returns Your system is ready to brew. and my Ruby Version is ruby 2.0.0p648 (2015-12-16 revision 53162) [x86_64-darwin16.6.0]
The error can be more easily repeatable using brew install zsh.
This happened to me when i had sudo'd to the postgres user.
Exiting back to my normal user allowed me to proceed without obstacle.

Objective Sharpie Error: Failed to run pod list

I'm using Cocoapods 1.4.0, Visual Studio Community for Mac 7.3.3 (build 12), Objective Sharpie 3.4.0-c0f0e73, Mac OS 10.12.6 (Sierra)
whenever I try to add the example Cocoapod on https://developer.xamarin.com/guides/cross-platform/macios/binding/objective-sharpie/examples/cocoapod/
I get the following error:
mbp:iOS user$ sharpie pod init ios AFNetworking
** Setting up CocoaPods master repo ...
(this may take a while the first time)
Setting up CocoaPods master repo
$ /usr/bin/git -C /Users/user/.cocoapods/repos/master fetch origin
--progress
remote: Counting objects: 1101, done.
remote: Compressing objects: 100% (224/224), done.
remote: Total 1101 (delta 540), reused 465 (delta 465), pack-reused 402
Receiving objects: 100% (1101/1101), 165.70 KiB | 2.91 MiB/s, done.
Resolving deltas: 100% (690/690), completed with 258 local objects.
From https://github.com/CocoaPods/Specs
6a7b167b826..807a5994b64 master -> origin/master
$ /usr/bin/git -C /Users/user/.cocoapods/repos/master rev-parse
--abbrev-ref HEAD
master
$ /usr/bin/git -C /Users/user/.cocoapods/repos/master reset --hard
origin/master
HEAD is now at 807a5994b64 [Add] SwiftyGif 4.1.0
Setup completed
** Searching for requested CocoaPods ...
error: Failed to run pod list
Does anyone know why, and who to work this around?
I'm just trying to add a Pod.
Note: I have no issues when trying to use CocoaPods on an Native iOS Project
This works fine for me using a fresh install of CocoaPods and Objective Sharpie.
Install CocoaPods from Homebrew:
brew install cocoapods
Find latest Objective Sharpie release on the Xamarin Forums and install it by double clicking the pkg file.
Now just run the same command you already tried:
sharpie pod init ios AFNetworking
--- ~/derp » sharpie pod init ios AFNetworking
** Setting up CocoaPods master repo ...
(this may take a while the first time)
Ignoring executable-hooks-1.4.2 because its extensions are not built. Try: gem pristine executable-hooks --version 1.4.2
Ignoring gem-wrappers-1.3.2 because its extensions are not built. Try: gem pristine gem-wrappers --version 1.3.2
Setting up CocoaPods master repo
$ /usr/local/bin/git -C /Users/tomasci/.cocoapods/repos/master fetch origin --progress
Enter passphrase for key '/Users/tomasci/.ssh/cheesebaron-github':
remote: Counting objects: 36, done.
remote: Compressing objects: 100% (33/33), done.
remote: Total 36 (delta 22), reused 0 (delta 0), pack-reused 0
From ssh://github.com/CocoaPods/Specs
e874a97a946..0d05aca4c0d master -> origin/master
$ /usr/local/bin/git -C /Users/tomasci/.cocoapods/repos/master rev-parse --abbrev-ref HEAD
master
$ /usr/local/bin/git -C /Users/tomasci/.cocoapods/repos/master reset --hard origin/master
HEAD is now at 0d05aca4c0d [Add] XTFMDB 1.5.0
CocoaPods 1.6.0.beta.1 is available.
To update use: `gem install cocoapods --pre`
[!] This is a test version we'd love you to try.
For more information, see https://blog.cocoapods.org and the CHANGELOG for this version at https://github.com/CocoaPods/CocoaPods/releases/tag/1.6.0.beta.1
Setup completed
** Searching for requested CocoaPods ...
** Working directory:
** - Writing Podfile ...
** - Installing CocoaPods ...
** (running `pod install --no-repo-update`)
Ignoring executable-hooks-1.4.2 because its extensions are not built. Try: gem pristine executable-hooks --version 1.4.2
Ignoring gem-wrappers-1.3.2 because its extensions are not built. Try: gem pristine gem-wrappers --version 1.3.2
Analyzing dependencies
Downloading dependencies
Installing AFNetworking (3.2.1)
Enter passphrase for key '/Users/tomasci/.ssh/cheesebaron-github':
Generating Pods project
Skipping User Project Integration
Sending stats
Pod installation complete! There is 1 dependency from the Podfile and 1 total pod installed.
** 🍻 Success! You can now use other `sharpie pod` commands.
The only thing that might be different here is that I have ssh config set up for GitHub.

Deploying a Go app with Imagemagick on Heroku

I've been trying to deploy a simple Go app with imagick
This requires Imagemagick. I've tried using the multi buildpack to install Imagemagick and run my app. This is how my .buildpack looks like:
https://github.com/mcollina/heroku-buildpack-imagemagick
https://github.com/kr/heroku-buildpack-go.git
And this is the error I see on Heroku:
Fetching repository, done.
Counting objects: 170, done.
Compressing objects: 100% (154/154), done.
Writing objects: 100% (169/169), 170.13 KiB | 0 bytes/s, done.
Total 169 (delta 21), reused 0 (delta 0)
-----> Fetching custom git buildpack... done
-----> Multipack app detected
=====> Downloading Buildpack: https://github.com/mcollina/heroku-buildpack-imagemagick
=====> Detected Framework:
-----> Installing libpng 1.5.14
Download completed
Installation completed
-----> Installing imagemagick 6.8.2-3
Download completed
Installation completed
-----> Building runtime environment for imagemagick
=====> Downloading Buildpack: https://github.com/kr/heroku-buildpack-go.git
=====> Detected Framework: Go
-----> Installing go1.3... done
-----> Running: godep go install -tags heroku ./...
# github.com/gographics/imagick/imagick
error: 'RemoveAlphaChannel' undeclared (first use in this function)
error: 'FlattenAlphaChannel' undeclared (first use in this function)
godep: go exit status 2
! Push rejected, failed to compile Multipack app
To git#heroku.com:philosoraptor-me.git
! [remote rejected] master -> master (pre-receive hook declined)
error: failed to push some refs to
I ended up using the image package from Go's excellent standard lib instead of depending on imagemagick.
This also taught me a valuable lesson about looking for a solution as close to the problem as possible than trying to solve it with a tool that I'm most familiar with.
Have you tried updating your local copy of gographics/imagick and doing godep update gographics/imagick ? The error error: 'FlattenAlphaChannel' undeclared seems to be coming from the library and not the buildpack

Homebrew error occurred when I command "brew cask install virtualbox" or "brew cask search google-chrome"

I'm trying to install virtual box with brew-cask, but That returns this kind of error and I cannot install virtualbox. I use MacOSX Lion 10.7.5 and homebrew 0.9.5, ruby 2.1.0-p0
I've described the process in Terminal below.
First of all, brew tap command is succeeded.
$ brew tap phinze/cask
Cloning into '/usr/local/Library/Taps/phinze/homebrew-cask'...
remote: Reusing existing pack: 32538, done.
remote: Counting objects: 36, done.
remote: Compressing objects: 100% (36/36), done.
remote: Total 32574 (delta 16), reused 2 (delta 0)
Receiving objects: 100% (32574/32574), 11.72 MiB | 379 KiB/s, done.
Resolving deltas: 100% (19138/19138), done.
Tapped 1 formula
It looks like you tapped a private repository. To avoid entering your
credentials each time you update, you can use git HTTP credential caching
or issue the following command:
cd /usr/local/Library/Taps/phinze/homebrew-cask
git remote set-url origin git#github.com:phinze/homebrew-cask.git
Second, I've already installed brew-cask as below
$ brew install brew-cask
Warning: brew-cask-0.35.0 already installed
Third, when I tried to install virtualbox, but it returns this kind of error, and I cannot get install the Virtualbox.
$ brew cask install virtualbox
==> Removing legacy Tap
Error: No available cask for virtualbox
The homebrew-cask repository has moved. Did you try:
brew tap caskroom/cask
brew install brew-cask
brew cask install virtualbox
instead of phinz?
Update:
As Jon Nalley points out, brew install brew-cask is now deprecated:
Important December 2015 update: Homebrew-Cask will now be kept up to date together with Homebrew (see #15381 for details). If you haven’t yet, run brew uninstall --force brew-cask; brew update to switch to the new system.
brew tap caskroom/cask
brew install brew-cask
brew cask install virtualbox
Worked for me.
At first, I got the "multiple taps" error:
~ $ brew install brew-cask
Error: Formulae found in multiple taps:
* caskroom/cask/brew-cask
* phinze/cask/brew-cask
Then, I included the full (caskroom) path to brew-cask and it worked:
brew install caskroom/cask/brew-cask
brew cask install virtualbox
brew install caskroom/cask/brew-cask
brew install homebrew/completions/brew-cask-completion
That worked for me
As of March 2021, the answer to this question is to use the cask command as below:
brew install --cask <anypackage>
For example:
brew install --cask virtualbox

Resources