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
1323 votes
82 answers
1.0m views

Xcode - How to fix 'NSUnknownKeyException', Reason: "… this class is not key value coding-compliant for the key X" error?

I'm trying to link a UILabel with an IBOutlet created in my class. My application is crashing with the following error" *** Terminating app due to uncaught exception 'NSUnknownKeyException', ...
2 votes
2 answers
2k views

Why is my PyGame application not running at all?

I have a simple Pygame program: #!/usr/bin/env python import pygame from pygame.locals import * pygame.init() win = pygame.display.set_mode((400,400)) pygame.display.set_caption("My first game&...
Itay's user avatar
  • 39
1408 votes
39 answers
514k views

How can I check for an active Internet connection on iOS or macOS?

I would like to check to see if I have an Internet connection on iOS using the Cocoa Touch libraries or on macOS using the Cocoa libraries. I came up with a way to do this using an NSURL. The way I ...
Brock Woolf's user avatar
  • 47.1k
940 votes
33 answers
892k views

Setting environment variables on OS X

What is the proper way to modify environment variables like PATH in OS X? I've looked on Google a little bit and found three different files to edit: /etc/paths ~/.profile ~/.tcshrc I don't ...
Paul Wicks's user avatar
  • 64.8k
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
238 votes
16 answers
143k views

Finding current executable's path without /proc/self/exe

It seems to me that Linux has it easy with /proc/self/exe. But I'd like to know if there is a convenient way to find the current application's directory in C/C++ with cross-platform interfaces. I've ...
Uros Dimitrijevic's user avatar
680 votes
7 answers
446k views

How to completely uninstall Android Studio on Mac?

I recently downloaded Android Studio on my Macbook Pro and I messed up with it every time I open it. It gives me plugin errors and several other errors. I need to uninstall it completely from my mac. ...
Mostafa Addam's user avatar
556 votes
16 answers
798k views

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 ...
Scott Wisniewski's user avatar
41 votes
6 answers
64k views

Paramiko "Unknown Server"

I'm trying to get started with the Paramiko library, but the library is throwing an exception as soon as I try to connect with the following simple program: import paramiko ssh = paramiko.SSHClient() ...
rcv's user avatar
  • 6,218
1671 votes
21 answers
3.0m views

How do I install pip on macOS or OS X?

I spent most of the day yesterday searching for a clear answer for installing pip (package manager for Python). I can't find a good solution. How do I install it?
The System's user avatar
  • 16.8k
1375 votes
38 answers
1.7m views

How to set or change the default Java (JDK) version on macOS?

How can you change the default version of Java on a mac?
Venkat's user avatar
  • 13.9k
262 votes
20 answers
162k views

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 ...
uhfocuz's user avatar
  • 3,160
257 votes
26 answers
394k views

Force DOM redraw/refresh on Chrome/Mac

Every once in a while, Chrome will render perfectly valid HTML/CSS incorrectly or not at all. Digging in through the DOM inspector is often enough to get it to realize the error of its ways and ...
Jason Kester's user avatar
  • 6,001
93 votes
11 answers
220k views

Update OpenSSL on OS X with Homebrew

I'm using MacOS X 10.7.5 and I need a newer OpenSSL version due to handshake failures. There are several tutorials on the internet and I tried the following: brew install openssl brew link openssl --...
Joachim's user avatar
  • 3,270
18 votes
2 answers
8k views

strptime, as.POSIXct and as.Date return unexpected NA

When I try to parse a timestamp in the following format: "Thu Nov 8 15:41:45 2012", only NA is returned. I am using Mac OS X, R 2.15.2 and Rstudio 0.97.237. The language of my OS is Dutch: I presume ...
Hemmik's user avatar
  • 183
962 votes
21 answers
344k views

Git ignore file for Xcode projects

Which files should I include in .gitignore when using Git in conjunction with Xcode?
Hagelin's user avatar
  • 16.6k
174 votes
15 answers
203k views

Homebrew refusing to link OpenSSL

I'm on: OSX 10.11.6, Homebrew version 0.9.9m OpenSSL 0.9.8zg 14 July 2015 I'm trying to play with with dotnetcore and by following their instructions, I've upgraded/installed the latest version of ...
daviddeath's user avatar
  • 2,513
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
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
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
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
189 votes
17 answers
146k views

Open document with default OS application in Python, both in Windows and Mac OS

I need to be able to open a document using its default application in Windows and Mac OS. Basically, I want to do the same thing that happens when you double-click on the document icon in Explorer or ...
Abdullah Jibaly's user avatar
19 votes
3 answers
19k views

Android update 17 seems incompatible with external Jars

I just allowed my Mac to do an update on its Java installation and now some of my old jars (like javax.mail and apache.commons.httpclient) are throwing "class not found" exceptions at run time! ...
Yevgeny Simkin's user avatar
107 votes
11 answers
52k views

Ruby Gem install Json fails on Mavericks and Xcode 5.1 - unknown argument: '-multiply_definedsuppress'

I was trying run gem install json and got the following error Gem::Ext::BuildError: ERROR: Failed to build gem native extension. /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/bin/...
g8M's user avatar
  • 1,263
192 votes
16 answers
140k views

Can't compile C program on a Mac after upgrade to Mojave

I have used the gcc command on the terminal to compile C programs but all of a sudden, after an update to my Mac's OS (to macOS 10.14 Mojave, and XCode 10.0), I started receiving the message: test.c:...
Maxxx's user avatar
  • 3,748
211 votes
12 answers
136k views

Execute a terminal command from a Cocoa app

How can I execute a terminal command (like grep) from my Objective-C Cocoa application?
lostInTransit's user avatar
72 votes
9 answers
233k views

How to install latest version of openssl Mac OS X El Capitan

I have used brew install openssl to download and install openssl v1.0.2f, however, it comes back saying: A CA file has been bootstrapped using certificates from the system keychain. To add additional ...
Tometoyou's user avatar
  • 8,176
36 votes
10 answers
27k views

Problems getting pygame to show anything but a blank screen on Macos

I recently bought a new macbook and I've been trying endlessly to get pygame to work, but haven't succeeded yet. I'm getting pretty desperate and I could really use some help. I've installed pygame ...
Boudewijn Maas's user avatar
3482 votes
41 answers
1.5m views

Git is not working after macOS update ("xcrun: error: invalid active developer path (/Library/Developer/CommandLineTools")

I updated to the latest OS, and/or restarted my computer (this happens on every major update, but this time all I did was restart my computer on 2022-09-13). This morning I navigated to my work's ...
dustbuster's user avatar
  • 81.7k
224 votes
22 answers
974k views

How to change default Python version?

I have installed Python 3.2 on my Mac. After I run /Applications/Python 3.2/Update Shell Profile.command, it's confusing that when I type python -V in Terminal, it says Python 2.6.1 which is not what ...
Zhu Shengqi's user avatar
  • 3,752
7 votes
1 answer
4k views

Mach-O 64-bit format does not support 32-bit absolute addresses. NASM Accessing Array

Running this code off my Mac computer, using command: nasm -f macho64 -o max.a maximum.asm This is the code I am attempting to run on my computer that finds the largest number inside an array. ...
Apthos's user avatar
  • 173
545 votes
16 answers
902k views

Set environment variables on Mac OS X Lion

When someone says "edit your .plist file" or "your .profile" or ".bash_profile" etc, this just confuses me. I have no idea where these files are, how to create them if I have to do that, etc, and also ...
Anders's user avatar
  • 12.7k
23 votes
2 answers
29k views

sed not giving me correct substitute operation for newline with Mac - differences between GNU sed and BSD / OSX sed [duplicate]

I'm using this reference : sed help: matching and replacing a literal "\n" (not the newline) and I have a file "test1.txt" that contains a string hello\ngoodbye I use this command to ...
Brandon Ling's user avatar
  • 3,887
1030 votes
30 answers
663k views

xcode-select active developer directory error

Saw the following error when running an npm install which required node-gyp... but could be triggered by anything which requires xcode-select. xcode-select: error: tool 'xcodebuild' requires Xcode, ...
tjmehta's user avatar
  • 30.2k
288 votes
30 answers
628k views

certificate verify failed: unable to get local issuer certificate

I am trying to get data from the web using python. I imported urllib.request package for it but while executing, I get error: certificate verify failed: unable to get local issuer certificate (_ssl.c:...
biswajit's user avatar
  • 3,177
3 votes
1 answer
5k views

WebDriverException: 'geckodriver' executable needs to be in PATH even though it is

Trying to get firefox to run using selenium in spyder. My current code is from selenium import webdriver import os os.environ["PATH"] += ":/usr/local/bin/geckodriver" browser = webdriver.Firefox() ...
Makenna Sophia Herl's user avatar
317 votes
4 answers
95k views

Core Data vs SQLite 3 [closed]

I am already quite familiar with relational databases and have used SQLite (and other databases) in the past. However, Core Data has a certain allure, so I am considering spending some time to learn ...
Jason Medeiros's user avatar
130 votes
6 answers
191k views

Getting "Permission Denied" when running pip as root on my Mac

I've started to use my Mac to install Python packages in the same way I do with my Windows PC at work; however on my Mac I've come across frequent permission denied errors while writing to log files ...
markwalker_'s user avatar
  • 12.8k
2139 votes
19 answers
1.8m views

Who is listening on a given TCP port on Mac OS X?

On Linux, I can use netstat -pntl | grep $PORT or fuser -n tcp $PORT to find out which process (PID) is listening on the specified TCP port. How do I get the same information on Mac OS X?
pts's user avatar
  • 85.6k
25 votes
1 answer
61k views

How to restore .bash_profile on a mac? None of my unix terminal are working [closed]

I added something to my bash_profile while trying to add Playframework to my path and something got messed up badly. I added the following line to my .bash_profile export PATH=$PATH:the path to my ...
j.jerrod.taylor's user avatar
209 votes
11 answers
276k views

Environment variables in Mac OS X

Update: The link below does not have a complete answer. Having to set the path or variable in two places (one for GUI and one for shell) is lame. Not Duplicate of: Setting environment variables in OS ...
Abdullah Jibaly's user avatar
4 votes
3 answers
8k views

JAR Bundler using OSXAdapter causing application to lag or terminate

I've created a simple Java application that each second for for 10 seconds consecutive seconds adds a new row to a JTable. It consists of three classes. The main class that gets called once the ...
kba's user avatar
  • 19.4k
287 votes
25 answers
680k views

Error: ANDROID_HOME is not set and "android" command not in your PATH. You must fulfill at least one of these conditions.

I'm trying to install PhoneGap and I'm getting the following error: Error: ANDROID_HOME is not set and "android" command not in your PATH. You must fulfill at least one of these conditions. ...
rrvasanth's user avatar
  • 2,901
26 votes
5 answers
32k views

Working with an Access database in Python on non-Windows platform (Linux or Mac)

I want to access the data in a Microsoft Access database. I have some .accdb and .mdb files and want to read them in Python. From my research, pyodbc can only be used on Windows platform, but I am ...
user2948166's user avatar
15 votes
4 answers
17k views

Re-paint on translucent frame/panel/component.

I'm trying to create a translucent window with Java on OSX and add a JLabel to it. This JLabel changes its text every second.... However the component is not repainting well. How can I solve ...
OscarRyz's user avatar
  • 198k
3035 votes
40 answers
4.4m views

Find (and kill) process locking port 3000 on Mac [closed]

How do I find (and kill) processes that listen to/use my TCP ports? I'm on macOS. Sometimes, after a crash or some bug, my Rails app is locking port 3000. I can't find it using ps -ef... When running ...
oma's user avatar
  • 40k
319 votes
21 answers
162k views

Getting a "This application is modifying the autolayout engine from a background thread" error?

Been encountering this error a lot in my OS X using swift: "This application is modifying the autolayout engine from a background thread, which can lead to engine corruption and weird crashes. ...
Mark's user avatar
  • 12.4k
237 votes
34 answers
459k views

Location of my.cnf file on macOS

I'm trying to follow along this tutorial to enable remote access to MySQL. The problem is, where should my.cnf file be located? I'm using Mac OS X Lion.
nicolas's user avatar
  • 2,630
20 votes
2 answers
24k views

clang-7: error: linker command failed with exit code 1 for macOS Big Sur

Installing R packages that need compiling in macOS is broken since Big Sur. Here is such an example. > install.packages('nlme') There is a binary version available but the source version is ...
geotheory's user avatar
  • 23.2k
270 votes
8 answers
215k views

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"...
jww's user avatar
  • 101k

1
2 3 4 5
297