Post not yet marked as solved
Machine - MacBook Pro 13 with Apple M1 chip
Hi team,
Just wanted to get some help in sorting Ahoy installation on new MacBook Pro 13 with Apple M1 chip.
I ran "brew install ahoy" but got a message saying "bottle not available"
I have been able to build it from source and as per log below, it seems to have installed.
But when I run any commands, I am getting a "zsh: segmentation fault ahoy help" error and unable to run any ahoy commands.
NOTE: MacBook CONSOLE LOG added below.
CONSOLE ERROR LOG -
++++++++++++++++++++++++++++++++++++++++
Process: ahoy [1840]
Path: /opt/homebrew/*/ahoy
Identifier: ahoy
Version: ???
Code Type: X86-64 (Translated)
Parent Process: zsh [1748]
Responsible: Terminal [1746]
User ID: 501
Date/Time: 2021-02-15 12:23:20.982 +1100
OS Version: macOS 11.2.1 (20D74)
Report Version: 12
Anonymous UUID: D7AF3B6F-CFAB-F9ED-0E45-DC1AD1784827
Sleep/Wake UUID: 1689D6DE-2DD8-496C-AAC6-A6BE6699BBE9
Time Awake Since Boot: 6300 seconds
Time Since Wake: 1500 seconds
System Integrity Protection: enabled
Crashed Thread: 0
Exception Type: EXC_BAD_ACCESS (SIGSEGV)
Exception Codes: KERN_INVALID_ADDRESS at 0x0000000000000018
Exception Note: EXC_CORPSE_NOTIFY
Termination Signal: Segmentation fault: 11
Termination Reason: Namespace SIGNAL, Code 0xb
Terminating Process: exc handler [1840]
VM Regions Near 0x18:-
__TEXT 1000000-125f000 [ 2428K] r-x/rwx SM=COW
Application Specific Information:
dyld2 mode
Thread 0 Crashed:
0 runtime 0x00007ffdfff70bb0 0x7ffdfff5f000 + 72624
1 0x00000000010518fd runtime.bsdthread_register + 29
2 0x00000000010295d1 runtime.schedinit + 161
Thread 1:: com.apple.rosetta.exceptionserver
0 runtime 0x00007ffdfff61238 0x7ffdfff5f000 + 8760
1 runtime 0x00007ffdfff6b354 0x7ffdfff5f000 + 50004
2 runtime 0x00007ffdfff6c1f8 0x7ffdfff5f000 + 53752
Thread 0 crashed with ARM Thread State (64-bit):
x0: 0x800000010000fb90 x1: 0x00000000010518a0 x2: 0x0000000000000000 x3: 0x0000000000000000
x4: 0x0000000000000000 x5: 0x0000000000000000 x6: 0x0000000000000000 x7: 0x000000c42000a020
x8: 0x00007ffdfffd4a00 x9: 0x00007ffdfffd4a08 x10: 0x0000000000000000 x11: 0x00000000ffffffff
x12: 0x0000000000000000 x13: 0x00000000ffffffee x14: 0x0000000000000140 x15: 0x0000000000000100
x16: 0x000000000000016e x17: 0x0000000000000000 x18: 0x800000010000fb90 x19: 0x0000000100000000
x20: 0x00000000000007ff x21: 0x0000000100014fc0 x22: 0x00000002055eaac8 x23: 0x000000000150e224
x24: 0x00000000010243b0 x25: 0x00000000013022d0 x26: 0x00000000012f8cd8 x27: 0x0000000000000000
x28: 0x00000000010518fd fp: 0x00007ffdfff70b98 lr: 0x000000000150e254
sp: 0x000000010000fb90 pc: 0x00007ffdfff70bb0 cpsr: 0x80000000
far: 0x0000000000000018 esr: 0x92000006
Binary Images:
0x1000000 - 0x125efff + (???)
0x1014d3000 - 0x10156efff dyld (832.7.3) 0D4EA85F-7E30-338B-9215-314A5A5539B6 /usr/lib/dyld
0x7ffdfff5f000 - 0x7ffdfffd2fff +runtime (203.30) C98E75A6-BDC8-3D5C-B95B-6422005E96D8 /Library/Apple/*/runtime
External Modification Summary:
Calls made by other processes targeting this process:
task_for_pid: 0
thread_create: 0
thread_set_state: 0
Calls made by this process:
task_for_pid: 0
thread_create: 0
thread_set_state: 0
Calls made by all processes on this machine:
task_for_pid: 4298
thread_create: 0
thread_set_state: 0
VM Region Summary:
ReadOnly portion of Libraries: Total=3972K resident=0K(0%) swapped_out_or_unallocated=3972K(100%)
Writable regions: Total=150.7M written=0K(0%) resident=0K(0%) swapped_out=0K(0%) unallocated=150.7M(100%) VIRTUAL REGION
REGION TYPE SIZE COUNT (non-coalesced)
=========== ======= =======
Rosetta Arena 2048K 1
Rosetta Generic 584K 143
Rosetta IndirectBranch 32K 1
Rosetta JIT 128.0M 1
Rosetta Return Stack 20K 2
Rosetta Thread Context 20K 2
VM_ALLOCATE 528.5G 9
VM_ALLOCATE (reserved) 8K 2 reserved VM address space (unallocated)
__DATA 488K 6
__DATA_CONST 32K 1
__LINKEDIT 492K 5
__TEXT 3516K 3
mapped file 4.7G 12
=========== ======= =======
TOTAL 533.3G 188
TOTAL, minus reserved VM space 533.3G 188
Post not yet marked as solved
I have postgresql app download to Mac - Im worrking in zsh shell. Created a rails new - went to db:create or migrate &bit wont let me.
now my error is
ERROR: While executing gem ... (Gem::FilePermissionError)
"You dont have permissions for /Library/Ruby/Gems/2.6.0 directory.
Post not yet marked as solved
I want to install an update of my cocoa application in an unattended manner(silent intallation) where user will not be doing any interaction on the mac installer app.
Through terminal it can be achieved using
sudo installer -package /Users/username/Downloads/MyPackage.pkg -target /Applications/
But sudo will require password.
Can it be done through a shell script? without passwords?
Post not yet marked as solved
As soon it finish installing every thing gets deleted. Removes everything. Any solution???
Also, when i try to list the file terminal always display:
jrkhatri@Jyotis-MacBook-Pro ~ % ls
zsh: killed ls
Any solutions??
Post not yet marked as solved
My tags are Zsh and Command Line Tools
I don't know if either of those apply to what is happening to me.
I have a script which is all the files in my app, for each there's a code sign command in this script. I run the script, and what is happening, according to what it shows in Terminal, it is not finishing the first command, it is starting the second command in the path section of the first, first just cuts off and second begins right there, no return
So naturally it finds a syntax error in the text eventually, none of the commands are run, it just prints the text of the script to screen with the commands merged as I said.
If I copy the commands out of the script one by one and run them in Terminal they run each just fine.
I did chmod 777 Path on the script file. I was told I have to do that to make it able to be run in Termimal.
Those all there is to this. I can't run a perfectly fine script. It checks out in Text and Pages, show invisibles, there are none that are not meant to be there, only spaces and a return at the end of each command.
Why would commands that work singly, not work in a script that is being run simply by dragging it to terminal, the path is typed, the hit return
I am new to this area, I program in a high level language, I only know it, I don't know what most coders know about Terminal and things like privileges, and many things. I only know Omnis.
Thank you.
Das Goravani
Post not yet marked as solved
I created a VENV.Even though I hardcoded in JSON files the path and deleted in the gut the path for python of my venv.still my systems default python keeps running.I am stuck I cannot get my venv python to run even though It says on vs code in the bottom that it is selected.Kindly help.
Post not yet marked as solved
Script Example:
sudo dscl . -create /Users/ITAdmin
sudo dscl . -create /Users/ITAdmin UserShell /bin/bash
sudo dscl . -create /Users/ITAdmin RealName ITAdmin
sudo dscl . -create /Users/ITAdmin UniqueID 502
sudo dscl . -create /Users/ITAdmin PrimaryGroupID 20
sudo dscl . -create /Users/ITAdmin NFSHomeDirectory /Local/Users/ITAdmin
sudo dscl . -create /Users/ITAdmin NFSHomeDirectory /Users/[ITuser]
sudo dscl . -passwd /Users/ITAdmin [password]
sudo dscl . -append /Groups/admin GroupMembership ITAdmin
When using this locally or remotely, it works except the Home folder does not create or show up in the UI. After further testing, it does show up after an initial first time login. With our remote workforce and the secondary reasons for needing this script, we're trying to find a way to mimic a user login to add into our actual other script so that the home folder is created without actual end user interaction (won't be possible.)
Or are there any other alternative ways to script a new admin user account?
(Or a better place to ask this?)
Thanks in advanced!
Post not yet marked as solved
For an IT department initiative, we have to remotely remove admin rights from a subset of M1 Macbook Air users. Their computers were set up manually with one original admin user account.
After much research and testing, the admin rights removal portion of our scripting is working except for the original admin user account. A few niche online resources indicated this might possibly be due to M1's having a new type of user account called an owner. I also read that any secondary accounts after the initial one should have access to the OIK and OIC so we're confused why admin rights aren't getting removed from that original user when it works on other secondary accounts in multiple ways of testing.
Any ideas or context surrounding this elusive new owner type of account, why the working script won't remove admin rights from that account but will for others, or if there's some missing info in order to accomplish this goal? We ideally would like to add an IT managed admin user and remove admin from the original user (current MDM does not support his inherently so we're getting creative.)
Post not yet marked as solved
Hi!
I am new to OSX Shell Script and am trying to work my way into it. I don't get the expected outcome with the following snippet of my script code and I have no idea, why. I read most of the Apple Shell Script Pimer and googled a lot about it, but to no avail.
I want to check the current username against some given usernames and set the value of a variable depending on the outcome. I used awk inside the shell script to get this done, but for some reason the for loop inside the awk part seems to change the value of the current username with every loop.
This is the code:
#!/bin/zsh
awk -v u=$USER 'BEGIN {
print "Username outside loop is " u;
count[0] = "Anton";
count[1] = "Bert";
count[2] = "Carl";
for ( c_num in count ) {
print "Username inside loop is " u;
print "Compare to "count[c_num];
if (u = count[c_num]) {
test_var = "X";
} else {
test_var = "Y";
}
print test_var;
}
}'
And this is what I get after I run it in terminal:
Username outside loop is Zac
Username inside loop is Zac
Compare to Carl
X
Username inside loop is Carl
Compare to Anton
X
Username inside loop is Anton
Compare to Bert
X
I don't see why 'u' is changed every loop.
I'm thankful for every help / advice!
Markus
Post not yet marked as solved
I've just bought a new MacBook Pro M1, and restored everything from my old Intel MacBook Pro using a Time Machine backup.
It was a pretty smooth process, a few glitches such as needing to re-download certain apps to get the M1 version (e.g. Android Studio).
One thing that I've noticed, and I don't know whether this is a Monterey thing or an M1 thing but as part of my day-to-day development work, I maintain various .sh files for building projects on different platforms.
I have found that as soon as I edit and save an existing .sh file using TextEdit, it then sets the quarantine bit on the file and prevents it running from inside Zsh:
zsh: operation not permitted: ./test.sh
xattr yields the following:
xattr ./test.sh
com.apple.TextEncoding
com.apple.lastuseddate#PS
com.apple.macl
com.apple.metadata:kMDLabel_pjtfm5adga5rvjv2xmgkyqjwmq
com.apple.quarantine
This is incredibly annoying and I can't believe it is by design - this is not a file that has been downloaded from the Internet, it's my own file. Why can't I edit it using TextEdit?
I do not get the same problem when I edit and save using Sublime Text, as one example, so what's with TextEdit doing that?
Post not yet marked as solved
Paths in /etc/paths.d are not expanded for all shells.
dotnet adds a /etc/paths.d/dotnet-cli-tools file that contains
~/.dotnet/tools
The ~/.dotnet/tools folder is used for tools that are 'global' across all projects for the same user.
The tilde is not expanded for zsh and executables installed to ~/.dotnet/tools will not be found via the PATH. $HOME/dotnet/tools is also not expanded. (There appears to be a difference with bash. bash does seem to expand the tilde but doesn't expand variables.)
The man page for path_helper says
Files in these directories should contain one path element per line.
The /etc/paths.d mechanism is great. Keeping installers out of a user's .profile/.zprofile/.zshrc/etc files is very helpful. But user home directory paths for the current user are not supported (at least not consistently across all shells) in the current implementation of path_helper and paths.d.
Not expanding paths might be by design or by omission but adding support for paths in the current user home would be useful.
Post not yet marked as solved
I am trying to open Facebook Messenger on my app. It opens so far as I can see my contacts, but before I can see my messages it closes. Then Terminal gives me this message:
Last login: Fri Dec 3 08:49:11 on ttys001
/Applications/Messenger.app/Contents/MacOS/Messenger ; exit;
[myusername]@iMac ~ % /Applications/Messenger.app/Contents/MacOS/Messenger ; exit;
zsh: abort /Applications/Messenger.app/Contents/MacOS/Messenger
Saving session...
...copying shared history...
...saving history...truncating history files...
...completed.
[Process completed]
Any suggestions how to open this app.
Post not yet marked as solved
Hi Guys,
I am using the new Apple M1 Max and macOS Monterey, I am trying to install cocoa pod but getting errors like below. I tried to fix it with help of StackOverflow and many ways but no luck. Please help to resolve this issue.
ERROR: While executing gem ... (Gem::FilePermissionError) You don't have write permissions for the /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/gems/2.6.0 directory.
Post not yet marked as solved
I have a command line tool that zsh refuses to run when built for Apple Silicon or as a univerisal binary (the specific message is zsh: killed TOOL_NAME). I can only get it to run if I build it exclusively for Intel/Rosetta.
Running/debugging from within Xcode works fine for any architecture.
The tool is a very simple C/C++ unix command-line tool; it doesn't have any external dependencies beyond the C runtime and the C++ STL.
I suspect something in code signing is going awry, but I've tried various team and certificate combinations without any luck. I've also tried enabling/disabling the app sandbox, also without any luck. (The app is not for distribution so it doesn't really need to be code signed at all.)
Any suggestions?
Post not yet marked as solved
I have some shell scripts that are needed to run on the Build Phase of my iOS App, but all of then keeps getting killed when trying to run.
For example with SwiftLint:
/Users/vinicius/Library/Developer/Xcode/DerivedData/MyProject-somerandomstuff/Build/Intermediates.noindex/MyProject.build/Debug-iphonesimulator/MyProject.build/Script-BE4377BE84BF95B2A0F6A35B.sh: line 2: 44634 Killed: 9 "${PODS_ROOT}/SwiftLint/swiftlint" autocorrect
I was thinking that could be related to some lack of permission, but I can't really identify if it really is, since it's executing the files.
Do you have any idea?
Post not yet marked as solved
Not really a "developer" question per se, but related to the Xcode developer tools as run on a new M1 Mac running Monterey (12.1).
When running various tools, such as "opendiff" I receive the following error reported on stderr:
objc[6599]: Class AMSupportURLConnectionDelegate is implemented in both /usr/lib/libauthinstall.dylib (0x1e30deb90) and /Library/Apple/System/Library/PrivateFrameworks/MobileDevice.framework/Versions/A/MobileDevice (0x108f7c2c8). One of the two will be used. Which one is undefined.
objc[6599]: Class AMSupportURLSession is implemented in both /usr/lib/libauthinstall.dylib (0x1e30debe0) and /Library/Apple/System/Library/PrivateFrameworks/MobileDevice.framework/Versions/A/MobileDevice (0x108f7c318). One of the two will be used. Which one is undefined.
I'm working on the assumption that two conflicting libraries have been installed that provide a definition for the same symbol, and (since the opendiff program loads and runs) that at least for now, both symbols are defined in a similar enough way that whichever one is actually loaded works.
I was at first very confused because there is actually no file on my system with the name /usr/lib/libauthinstall.dylib
While this makes the error message rather confusing, I found this thread https://developer.apple.com/forums/thread/692383 that makes clear that many of the files in /usr/lib in an earlier part of the release process are amalgamated, and I assume that libauthinstall.dylib is one of these files.
Given that this implies that the /usr/lib versions are likely the "more authoritative" versions, I am not actually sure why the directory /Library/Apple/System/Library/PrivateFrameworks/MobileDevice.framework even exists -- I don't do any mobile development on this machine, so I assume that it came out of the setup, or possible from a migration of the user content from a machine running BigSur (content transferred using TimeMachine).
Does anyone have any ideas regarding:
(a) how this came about (as it appears that both sources are installed by Apple), and
(b) how I can remove the conflict.
I'm using opendiff in a project workflow and really don't want to see the workflow polluted with spurious error messages, not to mention the fragility of not being able to control which symbol these tools are actually using.
Thanks in advance for any thoughts.
EDIT: There are a number of posts around the 'net linking this error with "homebrew". I believe that this is at least partially a red herring, because:
a) I don't use homebrew (though I do use MacPorts) -- I avoid hombrew largely because of its plan to play in /usr while MacPorts keeps everything well out of the way in /opt
b) both of the named sources are from Apple.
Post not yet marked as solved
Can we write batch scripts to configure permissions and system preferences for multiple apps on MacOS devices.
Post not yet marked as solved
Whenever I am trying to run the command "dsconfigad -show", it is not returning anything. But I can see that I am connected to a domain in "enterprise connect". My Mac version is Monterey(version 12.2). Can anyone solve this issue. Thanks in advance.
Post not yet marked as solved
I had a number of paths, aliases, customizations and such in my ZSH profile, but I opened up Terminal, today, and now the only thing in it is a path for SDKMAN.
how could this have happened?
can I restore my profile?
Post not yet marked as solved
When i compile the c program with mysql i get the next error:
ld: library not found for -lzstd
clang: error: linker command failed with exit code 1 (use -v to see invocation)
So i use the zstd (that i installed) directory link in my command line
gcc parking.o -o parking.exe `mysql_config --libs` -L/opt/homebrew/Cellar/zstd/1.5.2/lib
It creates the .exe but when i launch it i get
How can i solve it ? Need help please.