【发布时间】: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 配置文件时,我收到错误消息“没有这样的文件或目录”
我为这个我无法解决的问题苦苦挣扎了两天:(
【问题讨论】: