Skip to main content

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.

Filter by
Sorted by
Tagged with
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?
indentation's user avatar
  • 9,965
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 (...
Nivir's user avatar
  • 30.9k
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 ...
Marcus's user avatar
  • 9,302
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. ...
Jayson Minard's user avatar
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, ...
Dakkar's user avatar
  • 5,812
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, ...
user9426236's user avatar
  • 4,831
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'. ...
joseph.hainline's user avatar
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/...
Blaszard's user avatar
  • 31.7k
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/...
Cronay's user avatar
  • 4,965
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, ...
Jacobo Koenig's user avatar
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, ...
Robert Christie's user avatar
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 ...
Mike DeSimone's user avatar
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 ...
Yarin's user avatar
  • 180k
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, ...
Jan Deinhard's user avatar
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 ...
troelskn's user avatar
  • 117k
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.
Vitaly Zdanevich's user avatar
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?
Mark Nguyen's user avatar
  • 7,398
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 ...
Anders's user avatar
  • 10k
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 ...
Benjamin Oakes's user avatar
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?
Zhang Buzz's user avatar
  • 10.8k
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....
David Lu's user avatar
  • 4,161
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 ...
nikola's user avatar
  • 5,346
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 ...
gaggina's user avatar
  • 5,409
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 ...
Paul Wicks's user avatar
  • 64.8k
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" ...
rwolst's user avatar
  • 13.4k
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 ...
DarioSoller's user avatar
  • 4,139
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 ...
filipp.kowalski's user avatar
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 (...
Yang's user avatar
  • 9,932
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 ...
Nicolas Renon's user avatar
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 ...
user3006710's user avatar
  • 3,927
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 ...
Elad Benda2's user avatar
  • 14.9k
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 ...
pankaj's user avatar
  • 8,168
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 ...
klaffenboeck's user avatar
  • 6,337
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:...
woodings's user avatar
  • 7,643
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 ...
Arial's user avatar
  • 4,984
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.
Mint's user avatar
  • 15.3k
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 ...
DBWeinstein's user avatar
  • 9,229
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 ...
islander_zero's user avatar
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. ...
helion3's user avatar
  • 36.6k
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 ...
Sumit's user avatar
  • 4,022
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?
WildBill's user avatar
  • 9,271
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.
Jacek Kwiecień's user avatar
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 ...
Mingyu's user avatar
  • 32.9k
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 ...
dnadlinger's user avatar
  • 6,071
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 ...
Brock Woolf's user avatar
  • 47.1k
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"! ...
ibz's user avatar
  • 45.9k
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 ...
Finglish's user avatar
  • 9,884
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 ...
shrewdbeans's user avatar
  • 12.3k