Posts

Oracle Virtualbox crashing (aborting) on macOS [Solved]

Image
 I run into issues every time I update my VirtualBox version on my MacBook Pro. If you run into issues where you can't start a VM instance, try this fix. Open Virtualbox >> Go to your VM image >> Click on Settings >> Go to Audio >> Uncheck the "Enable Audio" box. This fixes VirtualBox VMs that crash or abort on macOS after an update, a recurring annoyance. The workaround is to disable audio for the affected VM in its settings. The audio backend is a common source of these crashes on macOS, so turning it off lets the VM start while leaving the rest of its configuration untouched.

Binary file (standard input) matches

Image
Error code: $ sudo cat /var/log/syslog | grep "tree" Binary file (standard input) matches Solution: $ sudo cat /var/log/syslog | grep "tree" --text Jul 14 17:43:00 osboxes kernel: [    3.042582] vboxguest: loading out-of-tree module taints kernel. Jul 15 13:24:47 osboxes kernel: [    3.420002] vboxguest: loading out-of-tree module taints kernel. Jul 15 13:54:22 osboxes kernel: [    3.027623] vboxguest: loading out-of-tree module taints kernel. Sep 28 12:59:21 osboxes kernel: [    3.165531] vboxguest: loading out-of-tree module taints kernel. Sep 28 13:46:04 osboxes kernel: [    2.755048] vboxguest: loading out-of-tree module taints kernel. Sep 28 13:51:08 osboxes kernel: [    3.508174] vboxguest: loading out-of-tree module taints kernel. Oct 19 21:04:41 osboxes kernel: [    2.762903] vboxguest: loading out-of-tree module taints kernel. Oct 19 21:11:51 osboxes kernel: [    2.566860] vboxguest: loading out-of-...

[Solved] 'cryptopp/aes.h' file not found; Expected namespace name

Image
If you are facing errors like " 'cryptopp/aes.h' file not found " or getting "Expected namespace name" error for " using namespace CryptoPP; " or similar compilation errors, refer to the following settings: Add "/usr/local/include" in Header search paths Add "/usr/local/lib" in Library search paths Add -lcryptopp as a Linker flag Refer to this article for more information:  https://com.puter.tips/2021/02/how-to-use-cryptopp-in-xcode.html These C++ build errors mean the compiler cannot find the Crypto++ headers or library, so the CryptoPP namespace looks undefined. The include and library search paths are not set. Adding /usr/local/include to the header search paths and the matching library path to the linker settings points the build at Crypto++ and clears both errors at once.

[How To] Use Boost in Xcode

Image
Using Boost C++ Libraries ( https://www.boost.org/ ) is relatively easier than setting up Cryptopp. [Ref.:  https://com.puter.tips/2021/02/how-to-use-cryptopp-in-xcode.html ] Step-1: Install boost libraries $ brew install boost Step-2: Link boost in Build Settings Navigate to Linking >> Other Linker Flags Add following flags as per your requirement -lboost_chrono -lboost_system -lboost_timer -lboost_regex This guide sets up the Boost C++ libraries in an Xcode project, which is simpler than wiring up some other libraries. After installing Boost with Homebrew, you add the linker flags so the project finds it. Boost is a large, widely used collection of peer reviewed C++ libraries, many of which later influenced the standard library. Getting the link settings right once lets you use any of them.

[Solved] code signature not valid for use in process using Library Validation

Image
So I was working on a C++ project on Xcode, and I updated to the latest version of Xcode with recommended default settings; then I started having the following errors: dyld: Library not loaded: /usr/local/lib/libcryptopp.dylib    Referenced from: /Users/devharsh/Library/Developer/Xcode/DerivedData/server-bohvcuztzndrrzhcoglrvuijfasj/Build/Products/Debug/server    Reason: no suitable image found.    Did find: /usr/local/lib/libcryptopp.dylib: code signature in (/usr/local/lib/libcryptopp.dylib) not valid for use in process using Library Validation: mapped file has no cdhash, completely unsigned? Code has to be at least ad-hoc signed. /usr/local/lib/libcryptopp.dylib: code signature in (/usr/local/lib/libcryptopp.dylib) not valid for use in process using Library Validation: mapped file has no cdhash, completely unsigned? Code has to be at least ad-hoc signed. /usr/local/lib/libcryptopp.dylib: code signature in (/usr/local/lib/libcryptopp.dylib) not vali...

[Solved] Google Sign-in Error: "sign in using your corporate mobile device"

Image
The error when you try to sign in to any Google service like Youtube or Google Drive from a corporate account: "We detected an unusual sign-in attempt. To ensure that someone else isn't trying to access your account, your organization needs you to sign in using your corporate mobile device (the phone or tablet you normally use to access your corporate account). If you don't have your corporate mobile device with you right now, try again later when you have your corporate mobile device with you. If you continue to have problems signing in, contact your administrator." To suppress this warning, you can: Login to Google Admin:  https://admin.google.com/ Go to Users >> Open the user account Go to "Login challenge." Click on "Turn off for 10 mins." Try to log in again, and it should be fine

Unable to revert mtime: /Library/Fonts [Solved]

Image
I was working on a python3 script on my macOS, and I came across this error: % python3 my-random-script.py Unable to revert mtime: /Library/Fonts I got it solved by installing libmagic: % brew install libmagic This message on macOS comes from the python-magic library when its underlying libmagic dependency is missing. The script still runs but cannot read file type information and prints this warning. Installing libmagic with Homebrew, as shown, supplies the missing piece and clears the message. python-magic relies on the same system libmagic that the file command uses.