libgthread not up-to-date when running qemu emulator - macos

I'm trying to run the Pebble emulator for the first time with one of my Pebble apps, and I'm getting the following message:
$ pebble install --emulator aplite
Couldn't launch emulator:
dyld: Library not loaded: /usr/local/lib/libgthread-2.0.0.dylib
Referenced from: /Users/sarbogast/pebble-dev/PebbleSDK-3.3/Pebble/common/qemu/qemu-system-arm_Darwin_x86_64
Reason: Incompatible library version: qemu-system-arm_Darwin_x86_64 requires version 4401.0.0 or later, but libgthread-2.0.0.dylib provides version 4201.0.0
So it seems that libgthread is too old. How should I upgrade it?

This command solved my problem:
brew update && brew upgrade glib

Related

dyld: Symbol not found: _vmnet_shared_interface_name_key

After trying to run the Emulator form Android Studio, i got the following:
dyld: Symbol not found: _vmnet_shared_interface_name_key
Referenced from: /goinfre/anel-bou/FlutterFolder/Android/sdk/emulator/qemu/darwin-x86_64/qemu-system-x86_64 (which was built for Mac OS X 11.1)
Expected in: /System/Library/Frameworks/vmnet.framework/Versions/A/vmnet
in /goinfre/anel-bou/FlutterFolder/Android/sdk/emulator/qemu/darwin-x86_64/qemu-system-x86_64.
And after trying to run Android Emulator without using Android Studio i got the following message:
e2r7p15% /goinfre/anel-bou/FlutterFolder/Android/sdk/emulator/qemu/darwin-x86_64/qemu-system-x86_64 ; exit;
dyld: Library not loaded: #rpath/libQt5WebEngineWidgetsAndroidEmu.5.12.1.dylib
Referenced from: /goinfre/anel-bou/FlutterFolder/Android/sdk/emulator/qemu/darwinx86_64/qemu-system-x86_64
Reason: image not found
zsh: abort
I am working with macOS Mojave 10.14.6 (that i cant update) and Android Studio Arctic Fox | 2020.3.1 Patch 2
I fixed it by downgrading the Emulator:
Download an old version of emulator (in my case i used emulator-darwin_x64-7425822 download from here)
Replace the emulator folder you downloaded with the one in your sdk folder. (should normally be here ~/Library/Android/sdk)
You can also fix it by upgrading your macOS version to the latest one.

dyld: Lybrary not loaded. Error in terminarl after installing XCode Beta 10

I recently installed XCode Beta 10 and afterwards, this message appears on the top of the terminal prompt every time I open it:
dyld: Library not loaded: /usr/local/opt/gdbm/lib/libgdbm.4.dylib
Referenced from: /usr/local/bin/zsh
Reason: image not found
zsh: abort
I checked the /usr/local/opt/gdbm/lib/ directory and the libgdbm.4.dylibfile is indeed missing, but a libgdbm.4.dylibfile is in there. What can I do to fix this?
I was able to fix this by simply running brew reinstall zsh.

cannot run gdb on mac's terminal even after codesign

I'm trying to install gdb on my Mac. I downloaded it with brew and code signed it according to the instructions on https://sourceware.org/gdb/wiki/BuildingOnDarwin
However, when I run gdb in the terminal, it still doesn't work and output the following error message:
dyld: Library not loaded: /usr/local/opt/mpfr/lib/libmpfr.6.dylib
Referenced from: /usr/local/bin/gdb
Reason: image not found
Trace/BPT trap: 5
Does anyone know what it means? My Mac version is 10.11.5, by the way
I ran into the same issue on macOS 10.11.6, I'm guessing (and this is just speculation; I don't actually know how Homebrew works) that Homebrew installed a pre-compiled version of gdb which depended on a library that existed on the machine it was compiled with, but did not exist on my machine.
At any rate, I was able to get a working version of gdb by downloading & unzipping version 7.12 (8.1 failed to compile on my machine) from http://ftp.gnu.org/gnu/gdb/gdb-7.12.tar.gz, then compiling & installing with (IIRC) the commands:
./configure
make
sudo make install
I blogged about this and the subsequent steps (getting the executable code-signed so that macOS would allow it to debug other processes, etc) here: http://prust.github.io/posts/2018-02-24-interactively-debugging-c-in-sublime-text-3.html
I get this problem too. And I find solution in https://qiita.com/yoshixj/items/698d94337ca447e9b9de
Since we don't have /usr/local/opt/mpfr/lib/libmpfr.6.dylib
we can simply install it. Use this command:
brew install gawk
echo 'export PATH="/usr/local/opt/gettext/bin:$PATH"' >> ~/.zshrc
I had the same error message when running gdb after installing it from Homebrew (gdb v8.1) on a Mac OS X El Capitan v10.11.6. However, installing it via Homebrew using its Python binary solved the issue:
brew install gdb --with-python
Beaware that this may take some time, since you'd be compiling gdb from scratch. After it's done, you still need to create a certificate and codesign gdb.

Git doesn't work after a clean installation using macports due to libcurl.4.dylib version?

I have a Mac OSX Lion 10.7.5 and the latest macports version 2.3.1. After successfully installing git I get the following error trying to clone a repository:
/Users/bravegag/code$ git --version
git version 2.1.2
/Users/bravegag/code$ git clone http://github.com/MTG/sms-tools.git
Cloning into 'sms-tools'...
dyld: Library not loaded: /opt/local/lib/libcurl.4.dylib
Referenced from: /opt/local/libexec/git-core/git-remote-http
Reason: Incompatible library version: git-remote-http requires version 8.0.0 or later, but libcurl.4.dylib provides version 7.0.0
Can anyone explain why this happens and how to fix it?
Make sure you don't have DYLD_LIBRARY_PATH set. It is generally not necessary on OS X and only useful for development. If you need it for a tool, you should contact the tool author to get their linking fixed, because libraries are usually referenced using absolute paths on OS X.

Tesseract and dylib on OSX Mountain Lion

I just installed imagemagick and tesseract through brew, everything went well. When I try tesseract -l eng decrypted.png output, though, I get the following error:
dyld: Library not loaded: /opt/local/lib/libpng15.15.dylib
Referenced from: /usr/local/bin/tesseract
Reason: Incompatible library version: tesseract requires version 32.0.0 or later, but libpng15.15.dylib provides version 29.0.0
Trace/BPT trap: 5
I searched everywhere but I couldn't find any place where it is explained how to update that dynamic library to version 32 (or higher). Any suggestions? Thanks!
Done by cleaning my installation of both the softwares and re-installing them through brew. Mind that if there is some linking problem, you have to execute brew link --overwrite tesseract to solve them.

Resources