Laravel-MacOS-失败。退出代码:127(找不到命令)工作目录

时间:2019-12-17 11:09:29

标签: php laravel bash

我正在研究laravel项目,在这里我试图像这样运行我的bash“ mdb-export.sh”脚本:

$fileMdb = public_path('wcArchivi.mdb');
$process = new Process("mdb-export -D '%Y-%m-%d %H:%M:%S' " . $fileMdb . " {$table}", null, null, null, null);
$process->mustRun();

此代码在生产中运行良好,但在本地不起作用,我收到此错误:

  

命令“ mdb-export -D'%Y-%m-%d%H:%M:%S'   /Applications/XAMPP/xamppfiles/htdocs/cartech/public/wcArchivi.mdb   CARVEI“失败。退出代码:127(找不到命令)工作目录:   / Applications / XAMPP / xamppfiles / htdocs / cartech / public输出:   ===============错误输出:=============== sh:mdb-export:找不到命令

我的脚本在哪里?

"/storage/import/mdb/mdb-export.sh"

所以我的配置bash_profile可能有问题吗?

我的bash_profile

source ~/.profile
export XAMPP_HOME=/Applications/XAMPP
#export PATH=${XAMPP_HOME}/bin:${PATH}
export PATH=/Users/diegoduran/flutter/bin
export PATH
eval $(/usr/libexec/path_helper -s)

当我尝试通过“ source .bash_profile”重新加载bash配置文件时,出现错误“没有此类文件或目录”

我在这个问题上挣扎了两天,我无法解决:(

1 个答案:

答案 0 :(得分:0)

我通过以下方式解决了此问题: brew install mdbtools

如何检查mdb-export是否正常工作?只需运行"mdb-export"并检查系统是否需要参数。