Manual Install of Xcode command line tools not working - ruby-on-rails

I've manually installed the Xcode command line tools from the Apple website, and I went through the install process but it doesn't seem to be working. I ran this from the terminal to see if it installed:
Zach-Boyette-MacBook-Pro-2:~ zachboyette$ pkgutil --pkg-info=com.apple.pkg.CLTools_Executables
package-id: com.apple.pkg.CLTools_Executables
version: 5.1.0.0.1.1396320587
volume: /
location: /
install-time: 1398301024
groups: com.apple.FindSystemFiles.pkg-group com.apple.DevToolsBoth.pkg-group com.apple.DevToolsNonRelocatableShared.pkg-group
So it looks like the command line tools have installed, but when I run this:
Zach-Boyette-MacBook-Pro-2:~ zachboyette$ xcode-select --install
A popup says: The "xcode-select" command requires the command line developer tools. Would you like to install the tools now?
I clicked install and then it said: Can't install the software because it is not currently available from the Software Update server.
I've read on other answers that the solution is to do a manual install, but I just did that so I don't understand why it's not working. Also, in Xcode downloads, it's not showing the Command Line Tools.
I've tried installing it manually many times so I don't know why it's not working.
Installing Jekyll still won't work:
Zach-Boyette-MacBook-Pro-2:~ zachboyette$ sudo gem install jekyll
Password:
Building native extensions. This could take a while...
ERROR: Error installing jekyll:
ERROR: Failed to build gem native extension.
EDIT: echo $PATH returns this:
Zach-Boyette-MacBook-Pro-2:~ zachboyette$ echo $PATH /usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/Users/zachboyette/.rvm/bin

Command Line Tools are not included in XCode 5.1.1
You have to install it manually, BUT DON'T USE "xcode-select --install". It does not work.
Open Xcode app.
Click on Xcode > Open Developer Tools > More Developers Tools.
That will take you to Downloads for Apple Developers web site.
Use your AppStore Id to login.
Download Command Line Tools for your Mac OS X version.

I have stumbled across this issue before when I completely hosed my development environment by deleting an ancient Xcode version.
Have you tried running sudo xcode-select -r to clean up? This sorted my problem.
From the man page:
-r, --reset
Unsets any user-specified developer directory, so that the
developer directory will be found via the default search mecha-
nism. This command must be run with superuser permissions (see
sudo(8)), and will affect all users on the system.

The easiest work around is to install the XCode app from the App Store then open XCode and agree to the Terms and Conditions.
From there the Command Line Developer Tools package can be installed on using xcode-select --install or by trying to use any command line developer tool in Terminal like git.

Related

Installing Wine on Mac OS Catalina. Error: No available formula with the name "wine"

I'm trying to install Wine on my Mac via Brew. I'm using Catalina and just updated brew, installed XQuartz and have Xcode installed. When I type the command "Brew install wine" it returns the following:
Error: No available formula with the name "wine"
==> Searching for a previously deleted formula (in the last month)...
Warning: homebrew/core is shallow clone. To get complete history run:
git -C "$(brew --repo homebrew/core)" fetch --unshallow
wine was deleted from homebrew/core in commit 82bd38bc:
wine: delete
To show the formula before removal run:
git -C "$(brew --repo homebrew/core)" show 82bd38bc^:Formula/wine.rb
If you still use this formula consider creating your own tap:
https://docs.brew.sh/How-to-Create-and-Maintain-a-Tap
I'm following this tutorial: https://www.davidbaumgold.com/tutorials/wine-mac/
When I run Brew doctor I get the following:
Please note that these warnings are just used to help the Homebrew maintainers
with debugging if you file an issue. If everything you use Homebrew for is
working fine: please don't worry or file an issue; just ignore this. Thanks!
Warning: "config" scripts exist outside your system or Homebrew directories.
`./configure` scripts often look for *-config scripts to determine if
software packages are installed, and which additional flags to use when
compiling and linking.
Having additional scripts in your path can confuse software installed via
Homebrew if the config script overrides a system or Homebrew-provided
script of the same name. We found the following "config" scripts:
/Library/Frameworks/Python.framework/Versions/3.7/bin/python3.7-config
/Library/Frameworks/Python.framework/Versions/3.7/bin/python3.7m-config
/Library/Frameworks/Python.framework/Versions/3.7/bin/python3-config
Warning: Unbrewed dylibs were found in /usr/local/lib.
If you didn't put them there on purpose they could cause problems when
building Homebrew formulae, and may need to be deleted.
Unexpected dylibs:
/usr/local/lib/libtcl8.6.dylib
/usr/local/lib/libtk8.6.dylib
Warning: Unbrewed header files were found in /usr/local/include.
If you didn't put them there on purpose they could cause problems when
building Homebrew formulae, and may need to be deleted.
Unexpected header files:
/usr/local/include/fakemysql.h
/usr/local/include/fakepq.h
/usr/local/include/fakesql.h
/usr/local/include/itcl.h
/usr/local/include/itcl2TclOO.h
/usr/local/include/itclDecls.h
/usr/local/include/itclInt.h
/usr/local/include/itclIntDecls.h
/usr/local/include/itclMigrate2TclCore.h
/usr/local/include/itclTclIntStubsFcn.h
/usr/local/include/mysqlStubs.h
/usr/local/include/odbcStubs.h
/usr/local/include/pqStubs.h
/usr/local/include/tcl.h
/usr/local/include/tclDecls.h
/usr/local/include/tclOO.h
/usr/local/include/tclOODecls.h
/usr/local/include/tclPlatDecls.h
/usr/local/include/tclThread.h
/usr/local/include/tclTomMath.h
/usr/local/include/tclTomMathDecls.h
/usr/local/include/tdbc.h
/usr/local/include/tdbcDecls.h
/usr/local/include/tdbcInt.h
/usr/local/include/tk.h
/usr/local/include/tkDecls.h
/usr/local/include/tkPlatDecls.h
Warning: Unbrewed .pc files were found in /usr/local/lib/pkgconfig.
If you didn't put them there on purpose they could cause problems when
building Homebrew formulae, and may need to be deleted.
Unexpected .pc files:
/usr/local/lib/pkgconfig/tcl.pc
/usr/local/lib/pkgconfig/tk.pc
Warning: Unbrewed static libraries were found in /usr/local/lib.
If you didn't put them there on purpose they could cause problems when
building Homebrew formulae, and may need to be deleted.
Unexpected static libraries:
/usr/local/lib/libtclstub8.6.a
/usr/local/lib/libtkstub8.6.a
I'm not sure these warnings has something to do with it.
Thanks in advance!
I was able to build Wine 64 bit from source on macOS Catalina and successfully run Notepad++ 64 bit on it.
My steps were more or less something like that:
Download Wine 4.20 from https://dl.winehq.org/wine/source/4.x/wine-4.20.tar.xz
Extract it
In terminal go to extracted directory
Run: ./configure --enable-win64
It showed that it cannot find some library (I do not remember what exactly) so I installed it with macports (sudo port install name_of_missing_package reported by ./configure)
After I was able to run ./configure --enable-win64 succesfully without errors in terminal run: make
It compiled after more than 30 minutes.
I run it with: ./wine start
It opened windows console and here I was able to cd to Notepad++ 64 bit directory (downloaded from https://notepad-plus-plus.org/repository/7.x/7.0/npp.7.bin.x64.zip note that newest version did not work and throwed some errors about some dll's)
I typed notepad++ to run exe file
It showed some errors about freetype fonts so I installed them with macports and I had to copy them from /opt/X11/lib to /usr/local/lib before wine detected them
After fixing freetype fonts problem I was able to run notepad++
Also you might want to run: sudo spctl --master-disable to disable gatekeeper if you will see some system alerts about loading app from unknown developer.
Also note that instead of ./wine start you can run ./wine explorer for graphical file manager instead of console
Those steps might not be exactly precise, as I'm not sure if I did not miss something but hope it will help someone.
Also note that obviously wine on macOS Catalina will be able to run only some 64 bit windows apps and all 32 bit windows app will not work. I also tested it with IrfanView 64 bit (https://www.fosshub.com/IrfanView.html?dwl=iview453_x64_setup.exe) and it also works fine.
In case you wanted to get wine working for purpose of running 32 bit games then unfortunately it will not work with wine but you can try with virtualbox. You can check https://www.youtube.com/watch?v=3AO8dF0vviQ for some performance improvements tips.
Wine hast been removed from homebrew due to the incompatibility to Macos Catalina
https://discourse.brew.sh/t/issue-with-wine/6188/3
Try using wine64 to run your .exe files after installing wine. The manuals and references don't seem to mention this explicitly.
More Info
I followed the guidance in the wine manual to install using home-brew. After install, I got an error when trying to test the installation like it says in the quickstart.
Install wine-stable using homebrew
brew tap homebrew/cask-versions
brew install --cask --no-quarantine wine-stable
After install, test by opening notepad
wine notepad
zsh: bad CPU type in executable: wine
While uninstalling wine, I noticed one of the linked libraries was called wine64. I immediately reinstalled and tried again using wine64 as the call, as I am using wine on an M1 Mac. This was successful!
You can also use winehelp to get access to more commands that will work with 64bit processor.
Based on https://github.com/Homebrew/homebrew-core/pull/46556#issuecomment-559938873 you can do brew cask install wine-stable on newer version of OS X. And works with recent versions of homebrew since the source version was moved :(
How to install wine on Mac OS Catalina with brew
install homebrew with
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)"
install xquartz to install wine using brew
brew cask install xquartz
install wine using brew
brew install homebrew/cask-versions/wine-devel
run wine and check the version
wine64 --version
As of Wine 5.0 there is no 32bit support on mac in the official version, but you are able to achieve it via the
Unofficial Wineskin Winery
You can download it from github releases here. And then create a Wineskin with WS11WineCX[64/32]bit19.0.[0/1]. All WS11 versions support Catalina. To use it you also need to turn off the no32exec boot argument. You theoretically can do it by typing:
sudo nvram boot-args="no32exec=0"
into the Terminal while you're logged in but it didn't work out for me, so if you'll have the same problem, reboot into the Recovery mode, in the menubar pick Utilities -> Terminal and type just:
nvram boot-args="no32exec=0"
(without sudo).
Example
To be more exact, to install eg. Steam 32bit, you would:
Install the Unofficiall Wineskin Winery from the provided link
Turn on the 32bit execution boot argument by going into Recovery Mode and entering nvram boot-args="no32exec=0" into the terminal
Open Wineskin, click the '+' sign and scroll down to find the WS11WineCX64bit19.0.1 (the newest version with 64 and 32 bit support, at the time of writing)
Click update/install under the Wrapper Version.
Click Create New Blank Wrapper, name it and click through installation of mono and gecko.
Launch the Wrapper App from Finder. Click Install Software, choose setup executable, and proceed through installation. Then pick the executable from a menu. (In case of steam, Steam.exe)
Note: If you get the "No windows app to open the file"(Like I did) error, click advanced -> configuration and set the Windows EXE to the path to the installer. Then find the place that it has installed in and set that as Windows EXE. Then you can run by clicking Test Run.
Enjoy your windows app, as an .app file!
Hope I helped!

Appium doctor shows error

When I run Appium doctor it shows:
Running iOS Checks
✖ Unknown SW Version Command: Error: Command failed: /bin/sh -c sw_vers -productVersion
/bin/sh: sw_vers: command not found
Appium-Doctor detected problems. Please fix and rerun Appium-Doctor.
Can anyone help let me know what is the wrong here?
running this solved my problem:
sudo xcode-select -s /Applications/Xcode.app/Contents/Developer
You need to install the command line tools as marked in your message:
✖ Xcode Command Line Tools are NOT installed
From osxDaily:
Launch the Terminal, found in /Applications/Utilities/
Type the following command string:
xcode-select --install
A software update popup window will appear that asks: “The xcode-select command requires the command line developer tools. Would you like to install the tools now?” choose to confirm this by clicking “Install”, then agree to the Terms of Service when requested (feel free to read them thoroughly, we’ll be here)
Wait for the Command Line Tools package download to complete, it’ll be about 130MB and installs fairly quickly depending on your connection speed
The installer goes away on its own when complete, and you can then confirm everything is working by trying to use one of the commands that were just installed, like gcc, git, svn, rebase, make, ld, otool, nm, whatever you want from the list below. Assuming the installation went uninterrupted, the command will execute as expected. This also means you can compile and install things from source code directly without having to use a package manager. Enjoy your new unix command line toolkit!
Have you tried upgrading to the latest Appium version? Are you installing Appium through terminal? My appium-doctor issues were fixed after I installed Appium through terminal and updated the path variables in .bash profile. Appium desktop application is different than one installed through command line.
There are only two possible area which causing that error:
You need to keep all path veriable updated and correct in .bash_profile
You must install
XCode
NodeJS
properly. You must have all permission to access those.
Install all latest version of following things
JDK (Java Development Kit),
Xcode ,
Command Line tools ,
APPIUM For MAC OS
In my case, xcode command line tool isn't set. Simply go to Xcode>Preferences>Locations>Select desired Xcode version in Command Line Tools. OR from terminal follow Chhagan's answer xcode-select -s your path

Cordova throws syntax error when trying to add platform

I'm trying to install Cordova and Ionic Framework on a Ubuntu server. I already used Node.js on it, so simply ran:
sudo npm install -g cordova
Then I cloned a sample project from GitHub
sudo git clone https://github.com/driftyco/ionic-weather.git
I entered the directory and tried to add the iOS platform library in order to build it:
cd ionic-weather
sudo cordova platform add ios
However it throws the following error:
Creating ios project...
/home/benedict/.cordova/lib/ios/cordova/3.4.0/bin/create: 33: /home/benedict/.cordova/lib/ios/cordova/3.4.0/bin/create: Syntax error: "(" unexpected
Error: /home/benedict/.cordova/lib/ios/cordova/3.4.0/bin/create: Command failed with exit code 2
at ChildProcess.whenDone (/usr/lib/node_modules/cordova/src/superspawn.js:112:23)
at ChildProcess.EventEmitter.emit (events.js:98:17)
at maybeClose (child_process.js:743:16)
at Process.ChildProcess._handle.onexit (child_process.js:810:5)
I've tried reinstalling Cordova in case something got corrupted, but no luck. I can't seem to find anyone else with this issue either so I'm kinda stuck. Any ideas?
This turned out to be a combination of several problems:
Ant is a required dependency, although it's not documented as a dependency as far as I can tell from any of the install guides the ionic guide or cordova guide point to. In fact I found this out by digging around SO and a few other dark corners of the internet
JDK must also be installed. (not just JRE)
2 folders have to be added to the path (for Android anyways).
Ant
This can be installed via sudo apt-get install ant.
jdk
sudo update-alternatives --config java
first, you can find out if you have jdk by running `sudo update-alternatives --get-selections | grep ^java
if you already have the jdk, you can update your jre to the jdk version using sudo update-alternatives --config java
if not, then install jdk (not just the jre), using sudo apt-get install openjdk-7-jdk
Path setting in ~/.bashrc
$ cd ~
$ sudo vi .bashrc
at the bottom, before the PATH= add the path to the bundle folders for both platform-tools folder and the tools folder under the sdk folder. Several of the guides only mention the platform-tools folder.
The guide specifically mentions ios can't be installed on Windows, but strangely leaves out Linux. This may be an oversight, but I can't be sure. There was some indication in the ionic guides that ios emulation could be done on linux, even though actual development could only be done on OSx.
the ios platform requires xcode 4.5 with cordova, which needs OSx 10.7 you basically can't add the ios platform tools on Windows or Linux. Unfortunately cordova and ionic both seem to forget Linux exists, and therefore the docs imply this will run on Linux when they note inoperability on Windows but say nothing about Linux.
Your problem is that your trying to build the app on a machine that doesnt have Mac OS installed. In order to add IOS platform you need to run this command on a mac.
Check the Prerequisites here:
http://docs.phonegap.com/en/3.0.0/guide_cli_index.md.html

Command line tools download in Xcode disappeared after Mavericks

After having installed Mavericks I got this problem on a code that compiled without problems before.
xcode-select --install triggers the installation without any strange problems,
yet when I try to build something with Eclipse it gives me
"Include path not found (/Applications/Xcode.app/Contents/Developer/usr/llvm-gcc-4.2/lib/gcc/i686-apple-darwin11/4.2.1/include)"
Infact in /Applications/Xcode.app/Contents/Developer/usr/ there's no llvm-gcc-4.2.
How can I fix this?
On my system in terminal:
/usr/bin/llvm-gcc-4.2
produces:
/usr/bin/llvm-gcc-4.2
/usr/bin/llvm-gcc-4.2
is linked to :
/usr/llvm-gcc-4.2/bin/llvm-gcc-4.2
Also
$ which llvm-gcc
produces:
/usr/bin/llvm-gcc
and
/usr/bin/llvm-gcc is linked to /usr/bin/clang
Note that Apple no longer provides llvm-gcc as an option in Xcode so perhaps it is no longer supplied as a command-line tool.
I had problems with the command line tools as well after upgrading to Mavericks, despite having updated Xcode, and I am quite sure I also installed the command line tools. Still, you can add them "by hand" downloading from apple site. I am not sure if it is any sort of bug of such, but anyway, I recommend you to download the latest Mavericks' Command Line Tools (late October) on Apple's developer site (needs free registration)

-bash: git: command not found in Xcode 4 in lion osx

Through Xcode 4.3 ->file -> source control -> repositories -> clone repository, I've cloned a repository from codesion.com. but when I go a git init or git add, the error -bash: git: command not found shows up. Now, Xcode 4.3 comes with the git installed, so what should I do to get this working?
Any help on this would be great.
Thanks in advance.
There is another option if you're not experienced with UNIX or you just don't want to mess with the system variables from the terminal. I had the same problem, and after some reading on SO and apple developer pages I've decided to install the Command Line Tools for Xcode. That solved the problem.
As the Xcode IDE from some 4.x version is an .app package and everything is stored inside that package, they have added the possibility to separately install the command line tools so that you have the command line tools inside the usr/bin/ path.
You can install the command line tools (as well as some other tools and documentation) from the Downloads tab of the Preferences window in Xcode (I have version 4.3), or from the apple developer website.
It's a path issue. See this question for the answer:
How to move GCC in osx from xcode to /usr/bin
(P.S. The question is different, but the answer the same.)

Resources