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
638
votes
66 answers

Postgres could not connect to server

After I did brew update and brew upgrade, my postgres got some problem. I tried to uninstall postgres and install it again, but it didn't work as well. This is the error message. (I also got this error message when I try to do rake db:migrate) $…
Gary Lai
  • 6,543
  • 3
  • 17
  • 16
636
votes
39 answers

dyld: Library not loaded: /usr/local/opt/icu4c/lib/libicui18n.62.dylib error running php after installing node with brew on Mac

I installed node using homebrew (Mojave), afterwards php stoped working and if I try to run php -v I get this error: php -v dyld: Library not loaded: /usr/local/opt/icu4c/lib/libicui18n.62.dylib Referenced from: /usr/local/bin/php Reason: image…
petekaner
  • 8,071
  • 5
  • 29
  • 52
633
votes
32 answers

How to install a gem or update RubyGems if it fails with a permissions error

I'm trying to install a gem using gem install mygem or update RubyGems using gem update --system, and it fails with this error: ERROR: While executing gem ... (Gem::FilePermissionError) You don't have write permissions for the…
Gaurav
  • 8,227
  • 4
  • 34
  • 55
631
votes
10 answers

OS X: equivalent of Linux's wget

How can I do an HTTP GET from a Un*x shell script on a stock OS X system? (installing third-party software is not an option, for this has to run on a lot of different systems which I don't have control on). For example if I start the Mercurial…
SyntaxT3rr0r
  • 27,745
  • 21
  • 87
  • 120
631
votes
19 answers

Do Swift-based applications work on OS X 10.9/iOS 7 and lower?

Will Swift-based applications work on OS X 10.9 (Mavericks)/iOS 7 and lower? For example, I have a machine running OS X 10.8 (Mountain Lion), and I am wondering if an application I write in Swift will run on it. Or what should I have to create a…
MeIr
  • 7,236
  • 6
  • 47
  • 80
629
votes
39 answers

bash: pip: command not found

I downloaded pip and ran python setup.py install and everything worked just fine. The very next step in the tutorial is to run pip install but before it even tries to find anything online I get an error "bash: pip: command not…
Trindaz
  • 17,029
  • 21
  • 82
  • 111
623
votes
5 answers

Installing ADB on macOS

I had issues finding a good solid tutorial on how to setup ADB for Mac. How can I add ADB to macOS in such a way that it can be used in the terminal? UPDATE For those reading this post. Yes, as the edited response says. I was at the time looking…
wesley franks
  • 6,765
  • 4
  • 16
  • 29
599
votes
7 answers

How to run a shell script on a Unix console or Mac terminal?

I know it, forget it and relearn it again. Time to write it down.
P-A
  • 10,882
  • 8
  • 26
  • 19
587
votes
27 answers

Where is JAVA_HOME on macOS Mojave (10.14) to Lion (10.7)?

Java is an optional package on the latest versions of macOS. Yet once installed it appears like the JAVA_HOME environment variable is not set properly.
Olivier Refalo
  • 50,287
  • 22
  • 91
  • 122
573
votes
16 answers

Command Line Tools not working - OS X El Capitan, Sierra, High Sierra, Mojave

I just upgraded from Yosemite to El Capitan (and replicated the problem upgrading from El Capitan to Sierra), and when I try to type for example git status inside a terminal, I get the following error: xcrun: error: invalid active developer path …
rista404
  • 7,639
  • 2
  • 18
  • 20
568
votes
14 answers

How to set keyboard shortcuts to jump to beginning/end of line?

I can see that Ctrl+left/right jumps to the beginning/end of line. How to change this to Cmd+left/right arrow?
chris
  • 7,222
  • 5
  • 31
  • 37
559
votes
33 answers

Open Sublime Text from Terminal in macOS

In Terminal when I use .subl It returns -bash: .subl: command not found Anyone know how to open Sublime Text 3 from the command line in macOS?
user1405049
  • 5,591
  • 3
  • 14
  • 3
547
votes
28 answers

Mongod complains that there is no /data/db folder

I am using my new mac for the first time today. I am following the get started guide on the mongodb.org up until the step where one creates the /data/db directory. btw, I used the homebrew route. So I open a terminal, and I think I am at what you…
Nik So
  • 16,683
  • 21
  • 74
  • 108
547
votes
32 answers

How to open Visual Studio Code from the command line on OSX?

The docs mention an executable called code, but I'm not sure where I can find that so I can put it on my path. The zip I downloaded from the VSCode site did not include any such executable. (I am able to run the .app just fine.) Is this a…
Nick Heiner
  • 119,074
  • 188
  • 476
  • 699
545
votes
16 answers

How to install Xcode Command Line Tools

How do I get the command-line build tools installed with the current Xcode/Mac OS X v10.8 (Mountain Lion) or later? Unlike Xcode there is no installer, it's just a bundle. It looks like all the command line tools are in the bundle, under…
Scott Wisniewski
  • 24,561
  • 8
  • 60
  • 89