xhost: "libXmuu.1.dylib" library not loaded - x11

I'm attempting to add my local IP address to xhost and I get the following error:
dyld: Library not loaded: /opt/X11/lib/libXmuu.1.dylib
Referenced from: /usr/bin/xhost
Reason: no suitable image found. Did find:
/opt/X11/lib/libXmuu.1.dylib: code signature in (/opt/X11/lib/libXmuu.1.dylib) not valid for use in process using Library Validation: mapping process is a platform binary, but mapped file is not
/opt/X11/lib/libXmuu.1.dylib: stat() failed with errno=1
Abort trap: 6
The error occurs even when just calling xhost from the command line. However, I it seems to be installed and in the correct place. The output of which xhost results in /usr/bin/xhost
I'm working on a fresh install of XQuartz and CommandLineTools. I've tried downgrading XQuartz, logging out and back in as well as rebooting after each fresh install. Still no luck.
This appears to be a documented issue, though I can't find any answers for fixes.
Operating System: OSX 10.14.5 on MacBook Pro, 2018
XQuartz Version: 2.7.11
Edit
Output of codesign -vvv -d /usr/bin/xhost:
Executable=/usr/bin/xhost
Identifier=xhost
Format=Mach-O universal (i386 x86_64)
CodeDirectory v=20200 size=261 flags=0x0(none) hashes=4+2 location=embedded
Hash type=sha256 size=32
CandidateCDHash sha1=ddd40d822185d02bc484aae27ab8a2a832490c9f
CandidateCDHash sha256=5c76bf6e89fc30926f3d38559f9cf813bcf63349
Hash choices=sha1,sha256
CDHash=5c76bf6e89fc30926f3d38559f9cf813bcf63349
Signature size=8928
Authority=Developer ID Application: Apple Inc. - XQuartz (NA574AWV7E)
Authority=Developer ID Certification Authority
Authority=Apple Root CA
Timestamp=Oct 7, 2016 at 1:26:16 PM
Info.plist=not bound
TeamIdentifier=NA574AWV7E
Sealed Resources=none
Internal requirements count=1 size=168

For me what worked is specifying the correct path for xhost:
/usr/X11/bin/xhost + 127.0.0.1
(macOS)

Related

dyld: Library not loaded: #rpath/libnetcdf.13.dylib ...Reason: image not found : GMT on MacOS Big Sur

I installed GMT4 from the source code on my Mac machine. Now, when I try using any command (e.g. pscoast) from GMT, It results into following error:
"dyld: Library not loaded: #rpath/libnetcdf.13.dylib
Referenced from: **********/GMT4.5.16/bin/pscoast
Reason: image not found
Abort trap: 6"
How to solve this issue?
As suggested here, the problem might be due to the fact that GMT expects libnetcdf to be built with different options than it is actually built on your machine. I had a similar problem when downloading ncview. My libnetcdf was built with conda-forge so installing ncview with conda-forgehelped.
If you're using conda as well, you can type conda list in a shell to see what was used to build the packages, and then maybe conda remove GMT to install it

openlink virtuoso installation ./config throwing error

I'm trying to install virtuoso's stable/7 branch manually from https://github.com/openlink/virtuoso-opensource. However, when I run ./configure, I get this error message after about 30 seconds:
checking OpenSSL version... configure: error: OpenSSL version 0.9.8e or greater is required.
The thing is, I do have OpenSSL. When I type openssl version -a in my terminal, I get this output:
benjhatch#benjamins-mbp virtuoso-opensource-stable-7 % openssl version -a
LibreSSL 2.8.3
built on: date not available
platform: information not available
options: bn(64,64) rc4(16x,int) des(idx,cisc,16,int) blowfish(idx)
compiler: information not available
OPENSSLDIR: "/private/etc/ssl"
Why is it saying I need an openssl version of 0.9.8e or greater? Is there any way to fix this?
This is on a Mac that runs MacOS Catalina version 10.15.3.
The issues has been resolved in the default Virtuoso open source develop/7 branch from:
https://github.com/openlink/virtuoso-opensource/tree/develop/7
which now supports LibreSSL which is what is shipped as the only SSL library available for the the latest macOS versions ...

On OSX "El capitan" also signed GDB don't run

Today I installed from macports the gdb debugger; following all the documents on the net I've signed GDB with a self signed certificate for code signing.
Despite that gdb don't run with the usual error:
`Unable to find Mach task port for process-id 1217: (os/kern) failure (0x5).
(please check gdb is codesigned - see taskgated(8))`
If running gdb with sudo it works fine.
Two clues:
When signing I was compelled to sudo, otherwise:
/opt/local/bin/ggdb: replacing existing signature
error: /Applications/Xcode.app/Contents/Developer/Toolchains /XcodeDefault.xctoolchain/usr/bin/codesign_allocate: can't create output file: /opt/local/bin/ggdb.cstemp (Permission denied)
/opt/local/bin/ggdb: the codesign_allocate helper tool cannot be found or used
I verified the signature with:
codesign --verify --verbose=9 /opt/local/bin/ggdb
and the result is:
`/opt/local/bin/ggdb: valid on disk
/opt/local/bin/ggdb: satisfies its Designated Requirement`
and with:
codesign --display --verbose=9 /opt/local/bin/ggdb
Executable=/opt/local/bin/ggdb
Identifier=org.gnu.gdb
Format=Mach-O thin (x86_64)
CodeDirectory v=20100 size=42012 flags=0x0(none) hashes=1309+2 location=embedded
Hash type=sha256 size=32
CandidateCDHash sha1=fcdc413a6e9a46c43dbf5a6bef10dfc9ca859139
CandidateCDHash sha256=299f6ddc02c908d00f2ec0e858cff9ff44732f03
Hash choices=sha1,sha256
-2=9181fb83a0797cdc555934e7e0b1ae35e91cf32040ebf25af11bf5bc1f1c5947
[Lots of hex...]
1307=6720981bf5bd01662bf60c634c900bc93bc5c4628db492f2865f17b7316eb0ef
1308=04de6d07a1d252c0f5b88640956b83a4d77594d7f175929c486434abea1e99c1
CDHash=299f6ddc02c908d00f2ec0e858cff9ff44732f03
Signature size=1745
Authority=gdb-cert
Signed Time=2-giu-2016, 16:11:02
Info.plist entries=4
TeamIdentifier=not set
Sealed Resources=none
Internal requirements count=1 size=88
Any clue to solve this issue will help a lot!
Thank you.

Terminal's "codesign" command trouble

I've been trying to use the "codesign" command on Mail.app so that I can modify the info.plist using the "defaults write" command. It used to work, but after I re-installed Yosemite, I get this result when running the command:
/Applications/Mail.app: no identity found
I ran this command:
codesign -f -s /Applications/Mail.app
If anyone could tell me how I could properly run the codesign command on Mail.app so that I can modify the info.plist of Mail.app using the "defaults write" command, that would be nice! Thanks!
You're just missing a parameter here. I can re-codesign an app using --force and specifying exactly which signature I want to use:
$ codesign --force -s "Developer ID Application: Michael Dautermann" Mail.app
Mail.app: replacing existing signature
And if you want to verify that Mail.app is indeed signed, here is what my copy of Mail looks like before I forced my signature onto it:
$codesign --display --verbose=4 Mail.app
Executable=/Applications/Mail.app/Contents/MacOS/Mail
Identifier=com.apple.mail
Format=bundle with Mach-O thin (x86_64)
CodeDirectory v=20100 size=23743 flags=0x0(none) hashes=1179+5 location=embedded
Hash type=sha1 size=20
CDHash=a3920218afa4f082aac98bf486dd797b13fde588
Signature size=4097
Authority=Software Signing
Authority=Apple Code Signing Certification Authority
Authority=Apple Root CA
Info.plist entries=41
TeamIdentifier=not set
Sealed Resources version=2 rules=15 files=262
Internal requirements count=1 size=64

Codesigning Kext with kext enabled certificate fails during kextload, "code signature invalid"

So we have a certificate that allows us to sign kexts,
but when we run > sudo kextload friendly.kext, it fails
and we sign the kext we want, and to prove it's signed, here's some diagnostic output:
👉 codesign --verify -vvvv friendly.kext
friendly.kext: valid on disk
friendly.kext: satisfies its Designated Requirement
👉 spctl -a -vvvv friendly.kext
friendly.kext: accepted
source=Developer ID
origin=Developer ID Application: Friendly Corporation
/Library/Extensions
👉 codesign -dvvv friendly.kext
Executable=/Library/Extensions/friendly.kext/Contents/MacOS/friendly
Identifier=com.friendly.friendly
Format=bundle with Mach-O thin (x86_64)
CodeDirectory v=20200 size=502 flags=0x0(none) hashes=18+3 location=embedded
Hash type=sha1 size=20
CDHash=a1e2bf8d53ea67c6cfe9fc3d6d2001fe56c838a7
Signature size=8528
Authority=Developer ID Application: Friendly Corporation
Authority=Developer ID Certification Authority
Authority=Apple Root CA
Timestamp=Oct 9, 2014, 11:49:02 AM
Info.plist entries=21
TeamIdentifier=1234567890
Sealed Resources version=2 rules=12 files=1
Internal requirements count=1 size=180
👉 codesign --verify -vvvv friendly.kext
friendly.kext: valid on disk
friendly.kext: satisfies its Designated Requirement
It looks like it's signed properly;
However, when I run > sudo kextutil -v friendly.kext :
Defaulting to kernel file '/System/Library/Kernels/kernel'
Diagnostics for /Library/Extensions/friendly.kext:
Code Signing Failure: code signature is invalid
/Library/Extensions/friendly.kext appears to be loadable (not including linkage for on-disk libraries).
ERROR: invalid signature for com.techsmith.friendly, will not load
I'm thinking either I downloaded the certificate wrong (we definitely got approved for kext signing), although I tried redownloading the certificate once before so that may not be the problem.
Otherwise, it's the way that I'm signing. I'm thinking maybe it has something to do with the permissions I set on the kext before I sign them?
Has anybody seen this problem before?
Thanks in advance!
The kext signing certificate must have the extension "( 1.2.840.113635.100.6.1.18 )" listed - this is what designates it as a kext-enabled certificate. You can easily verify this by viewing it in Keychain Access.app. (it's listed near the bottom, below extension "( 1.2.840.113635.100.6.1.13 )" which I think is used for apps and thus present in all Developer ID certificates)

Resources