Error installing Dart Development version on OS X with homebrew - dart

Have installed several versions of Dart on OS X using homebrew.
brew tap dart-lang/dart
brew install dart
Today I did a 'brew upgrade' to Dart 1.11.3 stable, because I want to run cucumber/selenium/chromedriver tests in dartium. Dartium is still at version 39.* and chromedriver wants 40something.
note: windows users are able to run these tests in dartium :(
So, tried installing development version 1.12.0-dev.5.0 to see if dartium would also upgrade. No joy
brew install dart --devel
Warning: dart-lang/dart/dart-1.11.3 already installed
Do I really have to uninstall to install the development version?

Same thing happened to me too.
I solved it with uninstalling dart first:
brew uninstall --force dart
brew install dart --devel --with-dartium --with-content-shell

Related

Unable to Upgrade Dart SDK from 2.18.7 to 2.19.0 using Homebrew

I am trying to upgrade my Dart SDK from 2.18.7 to 2.19.0 using homebrew formula brew upgrade dart.
However, the command always returns the same result
Warning: dart-lang/dart/dart 2.18.7 already installed.
brew info dart command shows:
==> dart-lang/dart/dart: stable 2.18.7, HEAD
SDK
https://dart.dev
Conflicts with:
dart-beta (because dart-beta ships the same binaries)
/usr/local/Cellar/dart/2.18.7 (921 files, 497MB) *
Built from source on 2023-01-29 at 02:33:36
From: https://github.com/dart-lang/homebrew-dart/blob/HEAD/Formula/dart.rb
==> Options
--HEAD
Install HEAD version
==> Caveats
Please note the path to the Dart SDK:
/usr/local/opt/dart/libexec
I also have tried:
brew uinstall dart<br>
brew install dart<br>
brew upgrade dart
brew upgrade dart --devel --force
resulting `Error: invalid option: --devel`
Please, kindly suggest me any other solutions that could help.
The issue occurred as the homebrew formula for dart 2.18.7 is missing in the homebrew core formula commit history:
https://github.com/Homebrew/homebrew-core/commits/master/Formula/dart-sdk.rb
However, my dart version upgraded to 2.18.7 from 2.18.6 by an unintentional brew upgrade command resulting the issue.

how to upgrade dart to 2.10.2 in MacOS

Today(2020/10/27) I want to upgrade my dart to version 2.10.2, then I use this command:
~ ⌚ 9:58:16
$ brew upgrade dart
Warning: dart-lang/dart/dart 2.9.3 already installed
why could not upgrade to 2.10.2? must I install dart from sources?
You have to run the command brew update before you upgrade with brew upgrade. What the upgrade command does is refresh the list of packages, their versions, and where to download. In other words, it runs git pull for each tap you've tapped, and the core tap. It's also similar to sudo apt-get update on linux systems with apt. In short, just run brew update && brew upgrade dart and it should work. If that doesn't work for some people, it might be that you have to install from source to get this version, as the question pointed out.

Issues with installing Ruby 2.0.0 on macOS Catalina

I'm running to issue installing Ruby 2.0.0 on a new macbook with macOS Catalina (version 10.15.7). At first I installed Ruby with rvm which did not work. I figured out that it was because Catalina's default terminal is ZSH instead of Bash (https://gorails.com/setup/osx/10.15-catalina). I was able to install Ruby 2.6.3 with the instructions but the issue is that the project I'm currently working on was written in Ruby 2.0.0. I tried installing this version with rbenv install 2.0.0-p0 but I ran to the following errors:
ruby-build: using libyaml from homebrew
Downloading openssl-1.0.2u.tar.gz...
-> https://dqw8nmjcqpjn7.cloudfront.net/ecd0c6ffb493dd06707d38b14bb4d8c2288bb7033735606569d8f90f89669d16
Installing openssl-1.0.2u...
Installed openssl-1.0.2u to /Users/vydoan/.rbenv/versions/2.0.0-p0
Downloading ruby-2.0.0-p0.tar.bz2...
-> https://cache.ruby-lang.org/pub/ruby/2.0/ruby-2.0.0-p0.tar.bz2
Installing ruby-2.0.0-p0...
WARNING: ruby-2.0.0-p0 is past its end of life and is now unsupported.
It no longer receives bug fixes or critical security updates.
ruby-build: using readline from homebrew
BUILD FAILED (Mac OS X 10.15.7 using ruby-build 20201005)
Inspect or clean up the working tree at /var/folders/m4/3k5xfdwx7x7gqkzzlyrlc_gc0000gn/T/ruby-build.20201006082731.4615.0q3Cat
Results logged to /var/folders/m4/3k5xfdwx7x7gqkzzlyrlc_gc0000gn/T/ruby-build.20201006082731.4615.log
Last 10 log lines:
compiling cont.c
compiling ./enc/ascii.c
thread.c:928:27: error: implicit conversion loses integer precision: 'long' to '__darwin_suseconds_t' (aka 'int') [-Werror,-Wshorten-64-to-32]
tp->tv_usec = ts.tv_nsec / 1000;
~ ~~~~~~~~~~~^~~~~~
compiling ./enc/us_ascii.c
1 error generated.
make: *** [thread.o] Error 1
make: *** Waiting for unfinished jobs....
1 warning generated.
I've tried doing the follow:
1.
brew tap homebrew/dupes
which gives me this error log
Error: homebrew/dupes was deprecated. This tap is now empty and all its contents were either deleted or migrated.
brew install gcc
rbenv install 2.0.0-p0
which gives me the same errors as above.
I've asked my team and found that another person also have issue with installing ruby on their new mac machines. The older mac didn't not have this problem. Was anyone able to successfully install Ruby 2.0.0 on the newer mac?
Hello I had numerous issues trying to install ruby 2.2.7 the project I work on has quiet a deprecated version of ruby necessary stated above now I ran into numerous problems they use rvm I could not install 2.2.7 using rvm I have however succeeded using rbenv the thing that ruins your experience is mainly the command line tools provided by Apple since in newer version it does not support compiling older ruby versions.
I also run the same version of MacOS :
Your best bet (since I've tried several days in a row to get my setup working installing ruby being the biggest blocker).Go to apple's developer site and download an older version of command line tools here and browse for 11.4.1(Before running the next steps make sure to purge previous attempts and ruby version managers and symlinks so it won't interfere with you next install and make your life hard).
Before downloading and installing it check your gcc -v remember that and install the command line tools you've downloaded and check it again to see if things went according to plan you should get something like:
Apple clang version 11.0.3 (clang-1103.0.32.59)
Target: x86_64-apple-darwin19.6.0
Thread model: posix
InstalledDir: /Library/Developer/CommandLineTools/usr/bin
I haven't tried other versions but this one works afterwards go to rbenv official website install the tools add the shell scripts to your local .zshrc file (if you don't have one just create it).Besides adding what the guide says it ommits an important step you also need to add this to your .zshrc:
export PATH="$HOME/.rbenv/bin:$PATH"
Then you should just close and open the terminal and install the ruby version you need :
# list latest stable versions:
$ rbenv install -l
# list all local versions:
$ rbenv install -L
# install a Ruby version:
$ rbenv install 2.0.0-p247
Consult the docs as of how to use them globally or locally also if use is not working end all terminal windows and the process restart and it should work just okay.
!Important mentions is to not change the command line tools when compiling different ruby related version may break the setup (ignore brew messages to update command line tools when running brew doctor)!

Xdebug install on macOS

I'm trying to install Xdebug on macOS Catalina but home-brew no longer allowed to run as root. Worked fine before Catalina update.
I was running Xdebug under Mojave but Catalina upgrade broke it. Removed extension to reinstall and then hit hombrew issue: get the following error when running brew as root:
Error: Running Homebrew as root is extremely dangerous and no longer supported.
As Homebrew does not drop privileges on installation you would be giving all
build scripts full access to your system.
Brew should be working without using sudo.
If that's not the case, your homebrew install is broken and you might need to reinstall it.
In any case brew doctor is something you can always consult.
After you got your homebrew fixed,
looking into Can't install xdebug on Mac with Homebrew might be of help.
Updating homebrew should do the trick -
brew update

PhantomJS version 1.4.0 version issue

I installed PhantomJS today and got this error trying to use it:
PhantomJS version 1.4.0
is too old. You must use at least version 1.7.0
(Capybara::Poltergeist::PhantomJSTooOld)
How can I install the newer version?
I can get the newer version (1.7) at: http://phantomjs.org/download.html
Once I've downloaded it though how do I actually install it?
Are you using Linux or OS X? You'll need to either build from source or install an updated PhantomJS package. You can also download the binaries and install over the system installed PhantomJS. Type "which phantomjs" and it should show the location of PhantomJS.
If you're using homebrew, just:
brew upgrade phantomjs
I had to solve this problem yesterday, it required me updating brew, telling brew to uninstall phantomJS, then updating xcode, then installing the latest xcode command utilities, then using brew to re-install phantomjs. Finally that got it to pull in the latest version. You might try this (mac):
brew update
brew uninstall phantomjs
brew doctor (follow the fixes it recommends if any... Mine was updating xcode)
brew install phantomjs
At that point it should grab the latest.
Good luck!

Resources