【问题标题】:Laravel - MacOS - failed. Exit Code: 127(Command not found) Working directoryLaravel - MacOS - 失败。退出代码:127(找不到命令)工作目录
【发布时间】:2019-12-18 00:17:56
【问题描述】:

我正在开发 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: command not found

我的脚本 sh 在哪里?

"/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 配置文件时,我收到错误消息“没有这样的文件或目录”

我为这个我无法解决的问题苦苦挣扎了两天:(

【问题讨论】:

    标签: php laravel bash


    【解决方案1】:

    我解决了这个问题: 冲泡安装 mdbtools

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

    【讨论】:

      猜你喜欢
      • 2012-03-24
      • 2019-05-02
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2018-12-11
      • 2015-03-02
      相关资源
      最近更新 更多