本文介绍了AppleScript:错误“sh:跛脚:找不到命令"127号的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我正在尝试使用以下命令创建 AppleScript.我遇到的一个问题是第三行有错误.我直接在终端中使用 lame
命令没有问题.此外,lame
不是原生 Mac 实用程序;我自己安装的.有人有解决办法吗?
I am trying to create an AppleScript with commands below. An issue I am having is there is an error at the third line. I have no problem using the lame
command in the terminal directly. In addition, lame
is not a native Mac utility; I installed it on my own. Does anybody have a solution?
do shell script "cd ~/Downloads"
do shell script "say -f ~/Downloads/RE.txt -o ~/Downloads/recording.aiff"
do shell script "lame -m m ~/Downloads/recording.aiff ~/Downloads/recording.mp3"
-- error "sh: lame: command not found" number 127
do shell script "rm recording.aiff RE.txt"
推荐答案
可能是 PATH
问题 - 对跛脚使用完整路径,例如
Probably a PATH
problem - use the full path for lame, e.g.
do shell script "/usr/local/bin/lame -m m ~/Downloads/recording.aiff ~/Downloads/recording.mp3"
这篇关于AppleScript:错误“sh:跛脚:找不到命令"127号的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!