由于这类软件的共同点是使用了部分 Intel 特有的指令如 intel_fast_memset 等,这些指令无法正常地被 AMD 处理器执行从而导致应用崩溃,可以参考以下教程解决。
解决教程
从Adobe Creative Cloud安装所需的Adobe应用程序。
打开终端。
将以下命令复制并粘贴到您的终端并运行(如果要求输入密码)。
for file in MMXCore FastCore TextModel libiomp5.dylib; do
find /Applications/Adobe* -type f -name $file | while read -r FILE; do
sudo -v
echo "found $FILE"
[[ ! -f ${FILE}.back ]] && sudo cp -f $FILE ${FILE}.back || sudo cp -f ${FILE}.back $FILE
echo $FILE | grep libiomp5 >/dev/null
if [[ $? == 0 ]]; then
dir=$(dirname "$FILE")
[[ ! -f ${HOME}/libiomp5.dylib ]] && cd $HOME && curl -sO https://excellmedia.dl.sourceforge.net/project/badgui2/libs/mac64/libiomp5.dylib
echo -n "replacing " && sudo cp -vf ${HOME}/libiomp5.dylib $dir && echo
rm -f ${HOME}/libiomp5.dylib
continue
fi
echo $FILE | grep TextModel >/dev/null
[[ $? == 0 ]] && echo "emptying $FILE" && sudo echo -n >$FILE && continue
echo "patching $FILE \n"
sudo perl -i -pe 's|\x90\x90\x90\x90\x56\xE8\x6A\x00|\x90\x90\x90\x90\x56\xE8\x3A\x00|sg' $FILE
sudo perl -i -pe 's|\x90\x90\x90\x90\x56\xE8\x4A\x00|\x90\x90\x90\x90\x56\xE8\x1A\x00|sg' $FILE
done
done
现在,将以下命令复制并粘贴到终端并运行它(如果要求输入密码)。
[ ! -d $HOME/Library/LaunchAgents ] && mkdir $HOME/Library/LaunchAgents
AGENT=$HOME/Library/LaunchAgents/environment.plist
sysctl -n machdep.cpu.brand_string | grep FX >/dev/null 2>&1
x=$(echo $(($? != 0 ? 5 : 4)))
cat >$AGENT <<EOF
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Label</key>
<string>mkl-debug</string>
<key>ProgramArguments</key>
<array>
<string>sh</string>
<string>-c</string>
<string>launchctl setenv MKL_DEBUG_CPU_TYPE $x;</string>
</array>
<key>RunAtLoad</key>
<true/>
</dict>
</plist>
EOF
launchctl load ${AGENT} >/dev/null 2>&1
launchctl start ${AGENT} >/dev/null 2>&1
重新启动macOS。
还原指令
要还原,请在终端中运行以下命令。
for file in MMXCore FastCore TextModel libiomp5.dylib; do
find /Applications/Adobe* -type f -name $file | while read -r FILE; do
sudo -v
[[ -f ${FILE}.back ]] && echo "found backup $FILE" && sudo mv -f ${FILE}.back $FILE
done
done
AGENT=$HOME/Library/LaunchAgents/environment.plist
if [[ -f $AGENT ]]; then
launchctl unload ${AGENT} >/dev/null 2>&1
launchctl stop ${AGENT} >/dev/null 2>&1
rm -rf $AGENT
fi
重新启动macOS