gistfile1.txt
· 1.2 KiB · Text
原始文件
Error 86:
#!/bin/bash
# Loop through all directories in PATH
for dir in ${PATH//:/ }; do
echo "$dir"
# Check if directory exists before trying to access
if [ -d "$dir" ]; then
# Loop through executable files in this directory
for file in $dir/*; do
# Check if file is executable
if [ -x "$file" ]; then
# Run desired command on executable file here
# For example:
if output=$(lipo -archs $file 2> /dev/null ); then
echo "$file" "$output" | grep -v "fatal error" | grep -v "arm64"
fi
fi
done
fi
done
% ./find86.sh
/opt/homebrew/bin
/opt/homebrew/sbin
/usr/local/bin
/usr/local/bin/aws x86_64
/usr/local/bin/aws_completer x86_64
/usr/local/bin/wkhtmltoimage x86_64
/usr/local/bin/wkhtmltopdf x86_64
/System/Cryptexes/App/usr/bin
/usr/bin
/bin
/usr/sbin
/sbin
/usr/local/go/bin
///Rosetta fix:
Running softwareupdate --install-rosetta fixes it for me.
(I ran that as part of installing Docker as per https://docs.docker.com/desktop/mac/apple-silicon/; since that appears to be a compatibility layer for older Mac binaries, I wondered if it might also fix this problem, and it seems to!)
https://github.com/mikaelbr/node-notifier/issues/361#issuecomment-968916810
1 | Error 86: |
2 | |
3 | #!/bin/bash |
4 | |
5 | # Loop through all directories in PATH |
6 | for dir in ${PATH//:/ }; do |
7 | echo "$dir" |
8 | # Check if directory exists before trying to access |
9 | if [ -d "$dir" ]; then |
10 | # Loop through executable files in this directory |
11 | for file in $dir/*; do |
12 | # Check if file is executable |
13 | if [ -x "$file" ]; then |
14 | # Run desired command on executable file here |
15 | # For example: |
16 | if output=$(lipo -archs $file 2> /dev/null ); then |
17 | echo "$file" "$output" | grep -v "fatal error" | grep -v "arm64" |
18 | fi |
19 | fi |
20 | done |
21 | fi |
22 | done |
23 | |
24 | % ./find86.sh |
25 | /opt/homebrew/bin |
26 | /opt/homebrew/sbin |
27 | /usr/local/bin |
28 | /usr/local/bin/aws x86_64 |
29 | /usr/local/bin/aws_completer x86_64 |
30 | /usr/local/bin/wkhtmltoimage x86_64 |
31 | /usr/local/bin/wkhtmltopdf x86_64 |
32 | /System/Cryptexes/App/usr/bin |
33 | /usr/bin |
34 | /bin |
35 | /usr/sbin |
36 | /sbin |
37 | /usr/local/go/bin |
38 | |
39 | |
40 | ///Rosetta fix: |
41 | |
42 | Running softwareupdate --install-rosetta fixes it for me. |
43 | (I ran that as part of installing Docker as per https://docs.docker.com/desktop/mac/apple-silicon/; since that appears to be a compatibility layer for older Mac binaries, I wondered if it might also fix this problem, and it seems to!) |
44 | |
45 | |
46 | https://github.com/mikaelbr/node-notifier/issues/361#issuecomment-968916810 |