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

TL;DR Make sure you have downloaded the latest ‘Command Line Tools’ package and run this from a terminal (command line): open /Library/Developer/CommandLineTools/Packages/macOS_SDK_headers_for_macOS_10.14.pkg For some information on Catalina, see Can’t compile a C program on a Mac after upgrading to Catalina 10.15. Extracting a semi-coherent answer from rather extensive comments… Preamble Very often, xcode-select –install has … Read more

Android update 17 seems incompatible with external Jars

crash at run time with exceptions that look like this: Could not find class ‘javax.mail.internet.InternetAddress’, referenced from method com.my.project.Main.isValidEmailAddress If you have problems with external jars, then: create a folder named libs. Copy and paste all needed external jar files into that folder. It will automatically be included, as explained on this page: Dealing with … Read more

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

First run /usr/libexec/java_home -V which will output something like the following: Matching Java Virtual Machines (3): 1.8.0_05, x86_64: “Java SE 8” /Library/Java/JavaVirtualMachines/jdk1.8.0_05.jdk/Contents/Home 1.6.0_65-b14-462, x86_64: “Java SE 6” /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home 1.6.0_65-b14-462, i386: “Java SE 6” /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home /Library/Java/JavaVirtualMachines/jdk1.8.0_05.jdk/Contents/Home Pick the version you want to be the default (1.6.0_65-b14-462 for arguments sake) then: export JAVA_HOME=`/usr/libexec/java_home -v 1.6.0_65-b14-462` or you … Read more

Paramiko “Unknown Server”

I experienced the same issue and here’s the solution that worked out for me: import paramiko client = paramiko.SSHClient() client.set_missing_host_key_policy(paramiko.AutoAddPolicy()) client.connect(‘127.0.0.1’, username=username, password=password) stdin, stdout, stderr = client.exec_command(‘ls -l’) This is to set the policy to use when connecting to a server that doesn’t have a host key in either the system or local HostKeys … Read more

Homebrew refusing to link OpenSSL

This is what worked for me: brew update brew install openssl ln -s /usr/local/opt/openssl/lib/libcrypto.1.0.0.dylib /usr/local/lib/ ln -s /usr/local/opt/openssl/lib/libssl.1.0.0.dylib /usr/local/lib/ ln -s /usr/local/Cellar/openssl/1.0.2j/bin/openssl /usr/local/bin/openssl Thanks to @dorlandode on this thread https://github.com/Homebrew/brew/pull/597 NB: I only used this as a temporary fix until I could spend time correctly installing Openssl again from scratch. As I remember I spent … Read more

How do I determine if my python shell is executing in 32bit or 64bit?

One way is to look at sys.maxsize as documented here: $ python-32 -c ‘import sys;print(“%x” % sys.maxsize, sys.maxsize > 2**32)’ (‘7fffffff’, False) $ python-64 -c ‘import sys;print(“%x” % sys.maxsize, sys.maxsize > 2**32)’ (‘7fffffffffffffff’, True) On Windows, run the same commands formatted as follows: python -c “import sys;print(\”%x\” % sys.maxsize, sys.maxsize > 2**32)” sys.maxsize was introduced … Read more