Questions tagged [macos]

macOS (formerly known as OS X or Mac OS X) is the desktop operating system from Apple, found on Macintosh computers. Use this tag only if your question relates to using macOS APIs or macOS-specific behavior, not because you happen to run your code on macOS. Questions relating to using or troubleshooting macOS are off-topic and belong in the Ask Different community instead.

macOS (formerly known as OS X until 2016 and Mac OS X until 2012) is the desktop operating system from Apple Inc., found on Macintosh computers.

Use this tag for questions about writing and debugging programs on macOS. Questions relating to using or troubleshooting macOS are off-topic (use apple.stackexchange.com instead).

macOS() consists of a Mach/BSD-based kernel, operating system interfaces primarily based on FreeBSD (), and additional frameworks (written in C (), C++ (), Objective-C () and Swift () providing user interface and application-level services.

It was the successor to Mac OS 9. macOS is based upon the NeXTSTEP and OpenStep operating systems developed in the 1980s and 1990s by NeXT Inc., which Apple purchased in 1996.

Versions

  • Current macOS Big Sur
  • macOS Catalina 10.15.1
  • macOS Mojave 10.14.1
  • macOS High Sierra (10.13)
  • macOS Sierra (10.12)
  • OS X El Capitan (10.11)
  • OS X Yosemite (10.10)
  • OS X Mavericks (10.9)
  • OS X Mountain Lion (10.8)
  • OS X Lion (10.7)
  • OS X Snow Leopard (10.6)
  • OS X Leopard (10.5)
  • OS X Tiger (10.4)
  • OS X Panther (10.3)
  • OS X Jaguar (10.2)
  • OS X Cheetah (10.1)
  • OS X Puma (10.0)

More information:

116456 questions
277
votes
19 answers

Check OS version in Swift?

I'm trying to check system information in Swift. I figured out, that it could be achieved by code: var sysData:CMutablePointer = nil let retVal:CInt = uname(sysData) I have two problems with this code: What should be sysData's initial…
Gergely
  • 3,025
  • 2
  • 14
  • 13
275
votes
16 answers

Java/JDK for the Apple Silicon chips

Will there need to be a special release of OpenJDK to support the new Apple Silicon chips? I see that there are currently downloads of the JDK for macOS/OS X, but these seem to only be for x86 processors. Is that correct? If so, where can I download…
Thar
  • 2,956
  • 2
  • 10
  • 9
274
votes
13 answers

pip installs packages successfully, but executables not found from command line

I am working on mac OS X Yosemite, version 10.10.3. I installed python2.7 and pip using macport as done in http://johnlaudun.org/20150512-installing-and-setting-pip-with-macports/ I can successfully install packages and import them inside my python…
Sanket_Diwale
  • 2,869
  • 2
  • 14
  • 18
274
votes
12 answers

How to run mvim (MacVim) from Terminal?

I have MacVim installed and I am trying to set it up as the editor for Git (version control), but I can't run 'mvim' from the command line as it isn't recognised. How do I setup mvim so I can run it from Terminal?
Fred
  • 4,729
  • 5
  • 26
  • 21
273
votes
7 answers

Brew install docker does not include docker engine?

Trying to setup docker from brew, however the engine does not seem to be included in any of the any of the official formulas. brew install docker-machine docker-compose So these only installs the clients? Is there no keg with the engine/daemon?
David Karlsson
  • 9,396
  • 9
  • 58
  • 103
271
votes
6 answers

How would I get a cron job to run every 30 minutes?

I'm looking to add a crontab entry to execute a script every 30 minutes, on the hour and 30 minutes past the hour or something close. I have the following, but it doesn't seem to run on 0. */30 * * * * What string do I need to use? The cron is…
Darryl Hein
  • 142,451
  • 95
  • 218
  • 261
271
votes
5 answers

How to install wget in macOS?

I try to install wget in MAC OS 10.11.1 but when I run ./configure --with-ssl=openssl I get this error: configure: error: --with-ssl=openssl was given, but SSL is not available. How to resolve this problem in OSX 10.11.1?
cfranco
  • 3,155
  • 5
  • 19
  • 20
269
votes
1 answer

Git doesn't work on MacOS Catalina: "xcrun: error: invalid active developer path (/Library/Developer/CommandLineTools), missing"

After upgrading to MacOS X 10.15 Catalina, I cannot run any git commands in my shell: The default interactive shell is now zsh. To update your account to use zsh, please run chsh -s /bin/zsh. For more details, please visit…
user6269864
268
votes
5 answers

Operation Not Permitted when on root - El Capitan (rootless disabled)

I am trying to move something to /usr/bin on OS X El Capitan. I have disabled rootless using the following commands: sudo nvram boot-args="rootless=0"; sudo reboot, but I keep getting the same error: MacBook-Air:~ Mark$ sudo cp class-dump…
Mark Bourke
  • 9,806
  • 7
  • 26
  • 30
266
votes
20 answers

Running pod setup gives me "bad interpreter: No such file or directory" error

Recently I tried to do pod setup and I get this error: -bash: /usr/local/bin/pod: /usr/local/opt/ruby/bin/ruby: bad interpreter: No such file or directory I followed Ray Wenderlich's guide to install CocoaPods and I get this issue so I have no idea…
user3670235
  • 3,125
  • 3
  • 13
  • 17
265
votes
19 answers

Error: Cannot install in Homebrew on ARM processor in Intel default prefix (/usr/local)

I use the latest Apple M1 chip processor. And I keep getting errors while application installation. say., brew install openjdk@11 Error: Cannot install in Homebrew on ARM processor in Intel default prefix (/usr/local)! Please create a new…
Prashanth Sams
  • 19,677
  • 20
  • 102
  • 125
264
votes
27 answers

Setting the MySQL root user password on OS X

I just installed MySQL on Mac OS X. The next step was setting the root user password, so I did this next: Launch the terminal app to access the Unix command line. Under the Unix prompt I executed these commands: cd…
madaura
  • 2,641
  • 3
  • 15
  • 3
262
votes
10 answers

`date` command on OS X doesn't have ISO 8601 `-I` option?

In a Bash script, I want to print the current datetime in ISO 8601 format (preferably UTC), and it seems that this should be as simple as date -I: http://ss64.com/bash/date.html But this doesn't seem to work on my Mac: $ date -I date: illegal option…
Aseem Kishore
  • 10,404
  • 10
  • 51
  • 56
262
votes
20 answers

Getting the difference between two Dates (months/days/hours/minutes/seconds) in Swift

I am trying to get the difference between the current date as NSDate() and a date from a PHP time(); call for example: NSDate(timeIntervalSinceReferenceDate: 1417147270). How do I go about getting the difference in time between the two dates. I'd…
uhfocuz
  • 3,178
  • 2
  • 13
  • 27
258
votes
8 answers

RE error: illegal byte sequence on Mac OS X

I'm trying to replace a string in a Makefile on Mac OS X for cross-compiling to iOS. The string has embedded double quotes. The command is: sed -i "" 's|"iphoneos-cross","llvm-gcc:-O3|"iphoneos-cross","clang:-Os|g' Configure And the error is: sed:…
jww
  • 97,681
  • 90
  • 411
  • 885