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
118,070
questions
517
votes
15
answers
150k
views
Using Caps Lock as Esc in Mac OS X
How do I make Caps Lock work like Esc in Mac OS X?
512
votes
1
answer
198k
views
Installation Issue with matplotlib Python [duplicate]
I have issue after installing the matplotlib package unable to import matplotlib.pyplot as plt. Any suggestion will be greatly appreciate.
>>> import matplotlib.pyplot as plt
Traceback (...
495
votes
21
answers
915k
views
How to set Python's default version to 3.x on OS X? [duplicate]
I'm running Mountain Lion and the basic default Python version is 2.7. I downloaded Python 3.3 and want to set it as default.
Currently:
$ python
version 2.7.5
$ python3.3
version 3.3
How ...
490
votes
11
answers
429k
views
How do I install Java on Mac OSX allowing version switching?
I want to install OpenJDK Java on Mac OSX and have it work alongside other JDK's since it is a newer release. Currently, I downloaded the tar.gz and placed it in my path but that is hard to maintain. ...
487
votes
22
answers
489k
views
Mac OS X and multiple Java versions
How can I install an additional java on MacOS? I installed jdk8 and that works fine. But now I need a jdk7 installation for development purposes. When trying to install the old version via DMG file, ...
485
votes
25
answers
719k
views
SQL Client for Mac OS X that works with MS SQL Server [closed]
How can I connect to a remote SQL server using Mac OS X? I don't really need a GUI, but it would be nice to have for the color coding and resultset grid. I'd rather not have to use a VM.
Is there a ...
483
votes
38
answers
704k
views
You don't have write permissions for the /Library/Ruby/Gems/2.3.0 directory. (mac user)
below is what I need to do.
To run the specs, you'll need to install RSpec. First, run gem install bundler in the root directory of your project. Then, run bundle install. To run a single spec file, ...
471
votes
14
answers
250k
views
OS X Bash, 'watch' command
I'm looking for the best way to duplicate the Linux 'watch' command on Mac OS X. I'd like to run a command every few seconds to pattern match on the contents of an output file using 'tail' and 'sed'.
...
470
votes
6
answers
56k
views
`pg_tblspc` missing after installation of latest version of OS X (Yosemite or El Capitan)
I use postgres from homebrew in my OS X, but when I reboot my system, sometimes the postgres doesn't start after the reboot, and so I manually tried to start it with postgres -D /usr/local/var/...
467
votes
44
answers
319k
views
dyld: Library not loaded: /usr/local/opt/openssl/lib/libssl.1.0.0.dylib
I installed vapor via homebrew and then immediately wanted to jump into a project by executing vapor new Hello but then got the following message back in the terminal:
dyld: Library not loaded: /usr/...
467
votes
42
answers
554k
views
How to run CocoaPods on Apple Silicon (M1)
I have a Flutter project that I'm trying to run on iOS. It runs normally on my Intel-based Mac, but on my new Apple Silicon-based M1 Mac it fails to install pods.
LoadError - dlsym(0x7f8926035eb0, ...
463
votes
15
answers
318k
views
What should I set JAVA_HOME environment variable on macOS X 10.6?
Many Java applications that use shell scripts to configure their environment use the JAVA_HOME environment variable to start the correct version of Java, locate JRE JARs, and so on.
In macOS X 10.6, ...
456
votes
17
answers
251k
views
How to discover number of *logical* cores on Mac OS X?
How can you tell, from the command line, how many cores are on the machine when you're running Mac OS X? On Linux, I use:
x=$(awk '/^processor/ {++n} END {print n+1}' /proc/cpuinfo)
It's not ...
455
votes
15
answers
367k
views
sed command with -i option failing on Mac, but works on Linux
I've successfully used the following sed command to search/replace text in Linux:
sed -i 's/old_link/new_link/g' *
However, when I try it on my Mac OS X, I get:
"command c expects \ followed by ...
452
votes
17
answers
1.1m
views
How to uninstall Python 2.7 on a Mac OS X 10.6.4?
I want to completely remove Python 2.7 from my Mac OS X 10.6.4. I managed to remove the entry from the PATH variable by reverting my .bash_profile. But I also want to remove all directories, files, ...
452
votes
26
answers
171k
views
How can I get the behavior of GNU's readlink -f on a Mac? [closed]
On Linux, the readlink utility accepts an option -f that follows additional links. This doesn't seem to work on Mac and possibly BSD based systems. What would the equivalent be?
Here's some debug ...
445
votes
8
answers
328k
views
Correct way to install psql without full Postgres on macOS?
Official page do not mention such case. But many users need only psql without a local database (I have it on AWS). Brew do not have psql.
437
votes
17
answers
764k
views
How to set NODE_ENV to production/development in OS X
For use in express.js environments. Any suggestions?
434
votes
20
answers
352k
views
How can I open the Atom editor from the command line in OS X?
I have the Atom editor and was wondering how you can open a file or folder from the terminal in Atom. I am using a Mac. I am looking for a way to do this:
atom . (opens folder)
atom file.js (opens ...
420
votes
18
answers
411k
views
View tabular file such as CSV from command line [closed]
Anyone know of a command-line CSV viewer for Linux/OS X? I'm thinking of something like less but that spaces out the columns in a more readable way. (I'd be fine with opening it with OpenOffice Calc ...
418
votes
3
answers
143k
views
What does brew tap mean?
Sometimes I see articles saying command of brew tap before brew install something. I am wondering what does tap mean? And why must I run tap before install?
416
votes
31
answers
1.4m
views
Error running 'pip install': "ImportError: No module named pip" [duplicate]
OS: Mac OS X 10.7.5 (Lion)
Python ver: 2.7.5
I have installed setuptools 1.0 with ez_setup.py from https://pypi.python.org/pypi/setuptools.
Then I downloaded pip.1.4.1 pkg from https://pypi.python....
416
votes
17
answers
590k
views
brew install mysql on macOS
I'm trying to setup up MySQL on mac os 10.6 using Homebrew by brew install mysql 5.1.52.
Everything goes well and I am also successful with the mysql_install_db.
However when I try to connect to the ...
411
votes
19
answers
266k
views
Brew doctor says: "Warning: /usr/local/include isn't writable."
Brew doctor says:
Warning: /usr/local/include isn't writable. This can happen if you "sudo make install" software that isn't managed by Homebrew.
If a brew tries to write a header file to ...
411
votes
21
answers
362k
views
Is there a way to make mv create the directory to be moved to if it doesn't exist?
So, if I'm in my home directory and I want to move foo.c to ~/bar/baz/foo.c , but those directories don't exist, is there some way to have those directories automatically created, so that you would ...
410
votes
42
answers
503k
views
dyld: Library not loaded ... Reason: Image not found
When trying to run an executable I've been sent in Mac OS X, I get the following error
dyld: Library not loaded: libboost_atomic.dylib
Referenced from: /Users/"Directory my executable is in"
...
409
votes
15
answers
346k
views
No “Proceed Anyway” option on NET::ERR_CERT_INVALID in Chrome on MacOS
I try to get my local development in Chrome back running, but Chrome prevents that, with the message that the certificate is invalid. Even though it could not be the date of the certificate, as you ...
405
votes
5
answers
812k
views
What is path of JDK on Mac ? [duplicate]
Im using Mac only at work and I need to set JAVA_HOME to proper path of JDK. I downloaded JDK, installed it and now I can't find it anywhere. I was looking at the internet for the solution, but there ...
397
votes
27
answers
355k
views
Installed Java 7 on Mac OS X but Terminal is still using version 6
I've installed JDK 7u7 downloaded from oracle's website. But after installation, the terminal is still showing java version 6
$java -version
java version "1.6.0_35"
Java(TM) SE Runtime Environment (...
397
votes
19
answers
412k
views
How to upgrade Git to latest version on macOS?
I just bought a new Mac and I checked in the Terminal what version of git is installed by default. I got the answer
git --version
> git version 1.7.5.4
I would like to upgrade git to the latest ...
389
votes
21
answers
1.1m
views
How to install PIL with pip on Mac OS?
I am trying to install PIL (the Python Imaging Library) using the command:
sudo pip install pil
but I get the following message:
Downloading/unpacking PIL
You are installing a potentially insecure ...
380
votes
31
answers
838k
views
After installing Homebrew I get `zsh: command not found: brew` [closed]
➜ ~ /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
-e:77: warning: Insecure world writable dir /usr/local/bin in PATH, mode 040677
It appears ...
372
votes
22
answers
463k
views
Not able to access adb in OS X through Terminal, "command not found"
I have installed Android SDK and Eclipse on my Mac system. I am able to program using Eclipse and have created few sample applications. But I am still not able to access adb through the terminal ...
367
votes
13
answers
212k
views
Postgres - FATAL: database files are incompatible with server
After restarting my MacBook Pro I am unable to start the database server:
could not connect to server: No such file or directory
Is the server running locally and accepting
connections on Unix domain ...
365
votes
13
answers
325k
views
How to increase IDE memory limit in IntelliJ IDEA on Mac?
I'm using IDEA 12 Leda on Mountain Lion. I wanted to increase the maximum memory that IDE can use. I set the VMOptions in Info.plist file to be
-Xmx2048m -ea -XX:+HeapDumpOnOutOfMemoryError -Xverify:...
363
votes
32
answers
628k
views
Virtualenv Command Not Found
I couldn't get virtualenv to work despite various attempts. I installed virtualenv on MAC OS X using:
pip install virtualenv
and have also added the PATH into my .bash_profile. Every time I try to ...
362
votes
16
answers
176k
views
Is there a command like "watch" or "inotifywait" on the Mac?
I want to watch a folder on my Mac and then execute a bash script, passing it the name of whatever file/folder was just moved into or created in the watched directory.
361
votes
26
answers
784k
views
Installing Homebrew on macOS
According to the Homebrew site, to install it, I need to type:
brew install wget
I get an error message:
-bash: brew: command not found
Found this answer. The problem, however, is I don't see brew ...
357
votes
20
answers
920k
views
How to set JAVA_HOME environment variable on Mac OS X 10.9?
I just purchased a brand new MacBook Pro.
This is my first MAC ever and I'm still trying to get the hang of navigating my way around.
Anyway, I'm also new to Java and I've been practicing on my ...
351
votes
6
answers
219k
views
Error when using 'sed' with 'find' command on OS X: "invalid command code ."
Being forced to use CVS for a current client and the address changed for the remote repo. The only way I can find to change the remote address in my local code is a recursive search and replace.
...
349
votes
14
answers
135k
views
Delete node_modules folder recursively from a specified path using command line
I have multiple npm projects saved in a local directory. Now I want to take backup of my projects without the node_modules folder, as it is taking a lot of space and can also be retrieved any time ...
348
votes
14
answers
392k
views
Replace comma with newline in sed on MacOS?
I have a file of strings that are comma separated. I'm trying to replace the commas with a new line. I've tried:
sed 's/,/\n/g' file
but it is not working. What am I missing?
347
votes
14
answers
519k
views
Setting ANDROID_HOME enviromental variable on Mac OS X
Could anybody post a working solution for setting ANDROID_HOME via the terminal?
My path to the Android-SDK is /Applications/ADT/sdk.
345
votes
15
answers
255k
views
Install gitk on Mac
How can I install gitk on a Mac?
From their official website, it seems gitk comes with Git, but the version of my Git (git version 1.7.12.4 (Apple Git-37)) does not come with gitk.
brew install gitk ...
344
votes
14
answers
119k
views
sed in-place flag that works both on Mac (BSD) and Linux [closed]
Is there an invocation of sed todo in-place editing without backups that works both on Linux and Mac? While the BSD sed shipped with OS X seems to need sed -i '' …, the GNU sed Linux distributions ...
342
votes
12
answers
511k
views
What languages are Windows, Mac OS X and Linux written in?
I was just wondering who knows what programming languages Windows, Mac OS X and Linux are made up from and what languages are used for each part of the OS (ie: Kernel, plug-in architecture, GUI ...
341
votes
9
answers
114k
views
Mac OS X Terminal: Map option+delete to "backward delete word"
Tried to map it from Preferences -> Settings -> Keyboard, but the "key" combo box has only "forward delete" but no "delete". My keyboard on the other hand has only "delete" and no "forward delete"!
...
339
votes
15
answers
74k
views
iPhone Simulator suddenly started running very slow
I have been working on an app in iphone simulator for a number of weeks and it has been running well up until now, but all of a sudden has begun running very slow both when loading content and ...
338
votes
89
answers
241k
views
Hidden Features of Xcode
With a huge influx of newbies to Xcode, I'm sure there are lots of Xcode tips and tricks to be shared.
What are yours?
338
votes
40
answers
625k
views
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/tmp/mysql.sock' [duplicate]
I installed MySQL on Mac OS X Mountain Lion with homebrew install mysql, but when I tried mysql -u root I got the following error:
ERROR 2002 (HY000): Can't connect to local MySQL server through ...