How to use fink on macOS 10.14.4 Mojave - xcode

My macos is Mojave, 10.14.4, and Xcode has been fully updated. I completed the task this morning. Additionally, after I downloaded Xcode through App Store, a popup announced
Install additional required components? Xcode requires additional components to support running and
debugging. Choose install to add required components.
and I fully complied. Finally I was able to open Xcode and the version is
Xcode 10.2.1 (10E1001)
For extra measure, I rebooted the computer. But fink still will not function; see below.
> fink install jhead
Password:
Use 'fink reinstall fink' to switch distributions
from 10.13 to 10.14.
'install' operation not permitted.
> fink reinstall fink
Use 'fink reinstall fink' to switch distributions
from 10.13 to 10.14.
Information about 11530 packages read in 2 seconds.
Failed:
The Xcode Command Line Tools need to be (re)installed.
Execute 'sudo xcode-select --install' to obtain them.
Or you can get them via direct download from developer.apple.com
(free registration required) if you don't want to install Xcode.app.
> sudo xcode-select --install
xcode-select: error: command line tools are already installed, use "Software Update" to install updates
> fink -V
Package manager version: 0.43.1
Distribution version: selfupdate-git Fri May 10 17:37:58 2019, 10.13, x86_64
Trees: local/main stable/main
Copyright (c) 2001 Christoph Pfisterer
Copyright (c) 2001-2016 The Fink Package Manager Team
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
>
How do I get fink to work?

Thanks to Alexander Hansen, Ph.D., Fink User Liaison, on fink-beginners#lists.sourceforge.net:
fink 0.43.1 won’t work on Mojave, period. We really can’t make a fink release work on OS versions that are newer, so we
encourage people to update fink before updating the OS.
You can download a fink version that will work from https://sourceforge.net/projects/fink/files/fink/0.44.1/fink_0.44.1-131_darwin-x86_64.deb/download , then from a terminal windowuse “sudo dpkg -i $HOME/Downloads/fink_0.44.1-131_darwin-x86_64.deb” to update it (replace $HOME/Downloads) with your actual download location.
This did the trick and I was subsequently able to install jhead.

Related

How to update Xcode Command Line Tools?

I am trying to update Command line tools on my mac osx.
~ softwareupdate --list
Software Update Tool
Copyright 2002-2015 Apple Inc.
Finding available software
Software Update found the following new or updated software:
* Command Line Tools (macOS El Capitan version 10.11) for Xcode-8.2
Command Line Tools (macOS El Capitan version 10.11) for Xcode (8.2), 150374K [recommended]
* iTunesX-12.5.5
iTunes (12.5.5), 263476K [recommended]
But when I run the update command, I get this error:
softwareupdate -i Command Line Tools (macOS El Capitan version 10.11) for Xcode-8.2
zsh: number expected
This doesn't work either:
softwareupdate -i Command Line Tools
Software Update Tool
Copyright 2002-2015 Apple Inc.
Command: No such update
Line: No such update
Tools: No such update
No updates are available.
What specific string should I specify after sofwareupdate -i command?
For future travelers, here's a version-agnostic approach. First, run softwareupdate --list. This will probably take a couple of minutes. When it's done, you'll see a bulleted (with an asterisk) output like this:
$ softwareupdate --list
Software Update Tool
Finding available software
Software Update found the following new or updated software:
* Command Line Tools (macOS High Sierra version 10.13) for Xcode-10.1
Command Line Tools (macOS High Sierra version 10.13) for Xcode (10.1), 190584K [recommended]
Find the bullet that refers to the Xcode command line tools. Copy that entire line (except the asterisk...). In the above case, you would copy: Command Line Tools (macOS High Sierra version 10.13) for Xcode-10.1
Then, run the install command (as shown by Brendan Shanks) with what you copied inside quotes:
softwareupdate -i "Command Line Tools (macOS High Sierra version 10.13) for Xcode-10.1"
I'm going to answer a slightly different question here, because this question came up when I searched for a solution to my problem. Hopefully it'll help someone (and it'll surely help me next time I run into the same issue).
I wanted to upgrade the command line tools from version 8 to 9. The App Store didn't suggest this upgrade, and neither did softwareupdate --list.
xcode-select --install
installed the new version of the tools. But clang --version still gave 8.0.0 as the version number. xcode-select -r and rebooting didn't solve this issue.
xcode-select -p returned /Applications/Xcode.app/Contents/Developer, and clang --version reported an installation directory under there. I thought I'd start over again.
sudo rm -rf /Applications/Xcode.app
deleted version 8 of the tools. But xcode-select --install said the command line tools were already installed.
sudo xcode-select -r
Now, sudo xcode-select -p returns /Library/Developer/CommandLineTools/.
It seems that the problem was that the new version of the tools are installed to a different directory, and xcode-select -r is not clever enough to find the latest version.
Run softwareupdate -i "Command Line Tools (macOS El Capitan version 10.11) for Xcode-8.2". The quotes are important.
I faced similar problem on MacOS Mojave version 10.14.3 with Xcode 10.3 installed.
The real problem was, when I installed the Xcode 10.3, I deleted the "Xcode-beta.app" first and then installed the new version. Therefore, when I tried installing CLion for C++ development and configuring it, CMake gave me error And Updating Command Line Tool didnt work for me:
softwareupdate -i "Command Line Tools (macOS Mojave version 10.14.3) for Xcode-10.3"
and showed me this response in terminal
Software Update Tool
Command Line Tools (macOS Mojave version 10.14.3) for Xcode-10.3: No such update
No updates are available.
Then I tried to check the version of Clang using:
clang --version
And the response lead me to the real problem i.e. Active Developer path was still pointing to Old version of Xcode that I had already deleted.
xcrun: error: active developer path ("/Applications/Xcode-beta.app/Contents/Developer") does not exist
Therefore, I switched the active developer path to latest Xcode App installed using:
sudo xcode-select --switch /Applications/Xcode.app
And everything worked like a charm automatically.
when upgrading to MacOS Catalina, Version 10.15.* you can install the command line tools for xcode 11.3 like this:
$ softwareupdate --list
Software Update Tool
Finding available software
Software Update found the following new or updated software:
* Label: Command Line Tools for Xcode-11.3
Title: Command Line Tools for Xcode, Version: 11.3, Size: 224878K, Recommended: YES,
$ sudo softwareupdate -i "Command Line Tools for Xcode-11.3"
The answer given by brew (when using an old version of Command Line Tools):
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
It worked for me, while softwareupdate --list did not show anything and softwareupdate --all --install --force answered No updates are available..
I ran the same command with sudo and that did the trick.
sudo softwareupdate -i "Command Line Tools (macOS El Capitan version 10.11) for Xcode-8.2"

Xcode installing on mac

I am new to mac and I want to install Xcode. I have macOS Sierra Version 10.12.2. I found online that I have to run in terminal:
xcode-select --install
I did that but I get this:
xcode-select: error: command line tools are already installed, use "Software Update" to install updates
However, I can't find it in Application folder or with Spotlight Search and there is no Software Update to be done. Also, I found online that I have to download it from App Store and I am a bit confused. I can install it from terminal (and if so, why is it not working) or I have to download it from App Store?
Thank you!
xcode-select: error: command line tools are already installed, use
"Software Update" to install updates
It shows that your operating system has already installed xcode-select.
Finding your xcode-select. Go to Terminal and type
xcode-select --print-path
It shall return the location of your xcode-select to you:
/Library/Developer/CommandLineTools
Xcode: develop an app for Apple products
xcode-select: command-line tool
Depending on what you want to do with Xcode, xcode-select is way smaller than it, 8.1GB vs. nothing.
2018 and I had the same issue. Installing XCODE from the App Store did not resolve this.
I Had to download the command line tools for my XCODE and Apple Version.
https://developer.apple.com/download/more/
Searched for XCODE on that page above and picked the right version for me.
After installation of the DMG I could continue with Brew Installation.
You don't install Xcode from terminal, you have to go to develloper.apple.com in order to download the latest versions. Here's the link to save you some time:
Link to Xcode
Plus the version available depends on what Mac Osx version you have.
Was having the same issue after some system update, cannot even run things like make install.
verify your path by xcode-select --print-path, which might be /Applications/Xcode.app/Contents/Developer(need to be updated at last)
go to apple develper site, login, search command line tools, download the latest dmg, install. (better option than the 10+GB Xcode)
now update the path in step 1 by running sudo xcode-select --switch /Library/Developer/CommandLineTools.
verify again by running the xcode-select --print-path.
Now it should be good to go.

Install GCC 5.X on Xcode 6

I need to use/integrate GCC 5.X (in my case 5.3, and it is already installed) on Xcode 6.2.
I've found a lot of outdated tutorials about GCC 4.X and Xcode 5 (or lower), but all of them are outdated and do not work anymore.
I've also found this tutorial, but I have not the 5.3.xcplugin file that the tuto recommend to copy.
I am still on Mac OS X Maverick, and I can install Xcode 7 if necessary.
Anybody would know how to do it?
MacPorts still has an installer for Mavericks. It will likely add /opt/local/bin:/opt/local/sbin to your $PATH in .profile, or whatever shell startup file you use, and leave a backup of the old file you can probably get rid of once you're satisfied.
I would suggest upgrading to the latest Xcode release - and to El Capitan unless you have some specific reason not to. AFAIK, if you can run Mavericks, you can run the latter. I will avoid any arguments about the merits of Brew vs. MacPorts here. There's plenty of documentation on the MacPorts pages.
Make sure the package database is up to date:
sudo port -v selfupdate`
Have a look at the existing gcc ports:
port list | grep gcc
note: you might as well install the stable gcc6 (6.1.0) package.
Install the package - this may also install dependency packages:
sudo port install gcc6 [-universal]
This may take a while, as it might need to build from source. For most packages, the -universal flag says that you don't care about 32-bit (IA32) builds, etc.
You can see various package versions with port select ... options, e.g.,
port select --list gcc
And enable the installed gcc:
sudo port select --set gcc mp-gcc6
You may need to rehash so the shell adds the new binaries to its search. Or just start a new shell. gcc -v should yield something like:
gcc version 6.1.0 (MacPorts gcc6 6.1.0_0)

Gdb on Mac OS X v10.7 (Lion)

I am a new Mac user and wonder how to install the latest version of GDB (> 7.1). I prefer to use Homebrew, but I could not find GDB listed.
brew install gdb
Error: No available formula for gdb
What is the best way to do it?
When installed Xcode, it may have installed an older version. Currently,
$ which gdb
/usr/bin/gdb
$ gdb --version
GNU gdb 6.3.50-20050815 (Apple version gdb-1705) (Fri Jul 1 10:50:06 UTC 2011)
Copyright 2004 Free Software Foundation, Inc.
But I need version > 7.1
System version,
Model Name: MacBook Air
System Version: Mac OS X 10.7.1 (11B2118)
Homebrew does not provide gcc and the associated development tool formulas over concerns that custom/non-system compilers could break builds. Two possibilities for easiness:
Use http://www.macports.org/
Look here https://github.com/mxcl/homebrew/wiki/Custom-GCC-and-cross-compilers
This is probably the command for you:
brew install https://raw.github.com/Homebrew/homebrew-dupes/master/gdb.rb
Some new users may find themselves in the same situation given the Mac OS X v10.9 (Mavericks) upgrade.
Solution
Install the development tools and Xcode
Then install Homebrew
Then do:
brew install homebrew/dupes/gdb
You will notice that some applications will not allow you to use the newly added GDB.
This is because it is not signed by Apple any more.
To side step this issue: Follow this; thanks to #andre
I've had some people hit me up on IRC for more detailed instructions for this. I made a post on my site. You can find it here.
This does not directly answer the given question, but if you're like me, what you really want is a simple way to run (something very much like) gdb.
Apple now uses Clang as its compiler, and it turns out that the clang debugger, lldb, is installed along with the other command-line tools. It appears that lldb is designed with a user interface that mimics gdb very closely.
So, the answer to your question may in fact be:
just use lldb!

How should I upgrade Xcode after upgrading to OS X Lion?

I've just found out, that my homebrew doesn't work anymore after I upgraded to OS X Lion.
$ brew install clojure
Warning: Xcode is not installed! Builds may fail!
Error: No such file or directory - /usr/bin/cc
and
$ brew doctor
We couldn't detect gcc 4.2.x. Some formulae require this compiler.
We couldn't detect gcc 4.0.x. Some formulae require this compiler.
You have no /usr/bin/cc. This will cause numerous build issues. Please
reinstall Xcode.
Setting DYLD_LIBRARY_PATH can break dynamic linking.
You should probably unset it.
after some googling, I found out that I should upgrade Xcode to version 4.1. The problem is, I have version 3.2.5 installed and I can't find any way of uninstalling it.
When I look at App Store, it looks like I don't have Xcode installed at all. I'm afraid that if I install it via App Store, it will somehow conflict with the version I have currently installed. However I can't find it in Applications, and I can't find any update function either.
Software Update doesn't prompt me to update Xcode, and I also don't see it in Installed Software.
What should I do?
Thanks to the readme found at /Developer, I found a way to uninstall Xcode via
$ sudo /Developer/Library/uninstall-devtools --mode=all
edit: I just ran the installer for Xcode 4, and it detected old version of Xcode, offering me to move it to /Developer-old.
I fixed it by
In theory this should work if you have Xcode4.3 installed (in /Applications):
$ sudo xcode-select -switch /Applications/Xcode.app/Contents/Developer/

Resources