Brew upgrade not working on latest OSX High Sierra beta version - xcode

I am getting the following error when upgrading brew packages
Error: Your Xcode (8.3.3) is too outdated.
Please update to Xcode 9.0 (or delete it).
Xcode can be updated from
https://developer.apple.com/download/more/
Since I am using the beta osx version
High Sierra
System Version: macOS 10.13
Kernel Version: Darwin 17.0.0
It seems like I have to upgrade the beta Xcode version (Xcode 9) too, which I have downloaded and installed successfully from apple website https://developer.apple.com/xcode/
Now, my question is how do I switch the Xcode version on my mac so that brew command uses the newly installed Xcode.
When I run xcodebuild -version I am getting the following output (installed from App store)
Xcode 8.3.3
Build version 8E3004b
whereas the beta version I have downloaded is from the apple website directly shows 9.0 beta 6

Since Xcode is downloaded from the website the full command to switch is the following (considering you've moved the app to the application folder)
sudo xcode-select --switch /Applications/Xcode-beta.app

I had to reinstall brew:
Uninstall it:
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/uninstall)"
Then you can install it again:
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"

Related

Flutter cocoapods version conflict (Installed But Not Working)

so simply i am trying to archive my flutter project using Xcode to push it through apple store connect review process, i faced a problem that declare that the cocoapods version is old .. i am using cocoapods through cocoapods app not the gem ..
i simply uninstalled the app cause it's the lastest version of the app (Not of cocoapods) and then uninstalled any cocoapods related previous gems so that cocoapods is totally uninstalled on my machine (M1 Macbook Air) & installed the cocoapods gem using sudo gem install cocoapods .. on flutter doctor -v in my device ~ it shows me that cocoapods is installed but now working
[!] Xcode - develop for iOS and macOS (Xcode 14.2) β€’ Xcode at /Applications/Xcode.app/Contents/Developer β€’ Build 14C18 βœ— CocoaPods installed but not working. You appear to have CocoaPods installed but it is not working. This can happen if the version of Ruby that CocoaPods was installed with is different from the one being used to invoke it. This can usually be fixed by re-installing CocoaPods. To re-install see https://guides.cocoapods.org/using/getting-started.html#installation for instructions.
and the weird thing that when i try to re-install cocoapods first i run
gem list --local | grep cocoapods
then i uninstall everything that shows up using sudo gem uninstall command after that when i try flutter doctor -v it still shows me that it's installed but not working, But how when I uninstalled the application and the gems and everything related
Take in mind that when i run pod related command after the gem and application uninstallation it shows me this [!] Unable to locate the CocoaPods.app application bundle. Please ensure the application is available and launch it at least once. zsh: illegal hardware instruction pod.. any Ideas Or Solutions?

macOS 11.0.1 - Flutter doctor gives cocopods error

I was stuck with cocoapods problem while trying to install Flutter on my computer. Although I was constantly installing it, it was not seen by the flutter doctor. How can I solve this problem?
blackx#Black-Air ~ % sudo flutter doctor
Password:
Woah! You appear to be trying to run flutter as root.
We strongly recommend running the flutter tool without superuser privileges.
/
πŸ“Ž
Doctor summary (to see all details, run flutter doctor -v):
[βœ“] Flutter (Channel stable, 1.22.5, on macOS 11.0.1 20B29 darwin-x64, locale tr-TR)
[βœ“] Android toolchain - develop for Android devices (Android SDK version 30.0.2)
[!] Xcode - develop for iOS and macOS (Xcode 12.3)
βœ— CocoaPods installed but not working.
You appear to have CocoaPods installed but it is not working.
This can happen if the version of Ruby that CocoaPods was installed with is different from the one being used to invoke it.
This can usually be fixed by re-installing CocoaPods. For more info, see https://github.com/flutter/flutter/issues/14293.
To re-install CocoaPods, run:
sudo gem install cocoapods
[βœ“] Android Studio (version 4.0)
[βœ“] VS Code (version 1.52.1)
[!] Connected device
! No devices available
! Doctor found issues in 2 categories.
Had the same problem.
I just looked up my .bash_history and tried to remember, so I don't know if all below is relevant or in the right order or complete. So here are more or less random commands which might help you.
In the flutter/ios folder
rm Podfile.lock
pod repo update
Elsewhere
sudo chown $(whoami) /usr/local/Homebrew
sudo brew cleanup -d -v
gem pristine ffi --version 1.14.2
curl -L https://get.rvm.io | bash -s stable
rvm install ruby
xcode-select --install
sudo brew tap --repair
brew install cocoapods
brew link cocoapods
git -C /user/local/Homebrew/Library/Taps/homebrew/homebrew-core fetch --unshallow
If you do find out how to actually do it, please remember the order of your commands so you can post them here too :)

Why does brew upgrade phantomjs tell me to update my xcode?

I have an older version of phantomjs:
phantomjs -v
2.0.0
I update the list:
$ brew update
Already up-to-date.
Then I try to upgrade phantomjs to latest version 2.1.1:
$ brew upgrade phantomjs
Error: Your Xcode (8.3.3) is too outdated.
And the error:
Error: Your Xcode (8.3.3) is too outdated. Please update to Xcode 9.4
(or delete it). Xcode can be updated from the App Store.
Why do I need to update Xcode in order to upgrade phantomjs to version 2.1.1?
Because it needs to compile the C and C++ in phantomjs. Homebrew requires a recent version of Xcode, along with recent macOS SDKs that come with Xcode, to do that.

brew doctor says "Your Xcode (3.2) is outdated Please install Xcode 4.6.2." but I already have it installed

brew doctor
gave me bunch of warnings, the last one is
Warning: Your Xcode (3.2) is outdated
Please install Xcode 4.6.2.
But I already have it installed on Mac OS X 10.8.3.
Try using the Xcode-select utility to set the default Xcode path:
sudo xcode-select -switch /path/to/Xcode.app
If this doesn't work you might also have to download and install the latest Xcode command line tools.
To uninstall older Xcode I did:
sudo /Developer/Library/uninstall-devtools –mode=all
as described here, and the warning disappeared.

Error compiling ruby 1.9.3 using rvm, homebrew, or macports

I've tried installing ruby 1.9.3 using rvm, using homebrew, and using macports and all seem to fail part way through the compile. I'm using Lion OSX.
Here is the log file of my most recent attempt using rvm
http://pastebin.com/AEiJbGzD
Any help would be appreciated. It all started when I started getting openssl errors so tried uninstalling openssl and re-installing it. Openssl installed with no issue but then I couldn't get ruby re-installed.
Thanks
I was able to install Ruby 1.9.3 on Lion and Xcode 4.2 using rvm with the --with-gcc=clang flag:
$ rvm install 1.9.3 --with-gcc=clang
You should install OSX GCC installer:
GitHub - OSX GCC Installer
After installation you run:
CC=/usr/bin/gcc-4.2 rvm install 1.9.3
And it should work.
Or you can change permanently:
export CC=/usr/bin/gcc-4.2
rvm install 1.9.3
Xcode 4.2 doesn't install non-LLVM gcc anymore.
I have had this problem after reinstall mountain lion (clean install) and after install XCode 5 DP... I have followed the steps and installed Command Line Tools from Xcode/Preferences... and had having the same problem.
I have been checking https://developer.apple.com/downloads/index.action?=command%20line%20tools and installed "Command Line Tools (OS X Mountain Lion) for Xcode - April 2013" after that, everything works fine.
Regards

Resources