虽然我安装了lua cmd无法在macos中识别

时间:2017-12-01 08:35:08

标签: bash lua

我在我的mac中安装lua成功,但我得到了#34; -bash:lua:命令未找到"当我运行lua cmd但是我运行/ usr / loca / bin / lua成功时,我确认lua安装的路径包含在PATH中。我记录了一些信息如下:
lxr:bin wang $ pwd
在/ usr / local / bin目录
lxr:bin wang $ echo $ PATH
;在/ usr / local / bin目录:在/ usr / bin中:/ bin中:/ usr / sbin目录:/ sbin目录:JAVA_HOME / bin中
lxr:bin wang $ lua
-bash:lua:找不到命令
lxr:bin wang $ pwd
在/ usr / local / bin目录
lxr:bin wang $ ls -l <​​br/> 总计872
-rwxr-xr-x 1根轮80 11 23 00:40 VBoxAutostart
-rwxr-xr-x 1根轮82 11 23 00:40 VBoxBalloonCtrl
-rwxr-xr-x 1根轮80 11 23 00:40 VBoxBugReport
-rwxr-xr-x 1根轮77 11 23 00:40 VBoxDTrace
-rwxr-xr-x 1根轮79 11 23 00:40 VBoxHeadless
-rwxr-xr-x 1根轮77 11 23 00:40 VBoxManage
-rwxr-xr-x 1根轮79 11 23 00:40 VBoxVRDP
-rwxr-xr-x 1根轮77 11 23 00:40 VirtualBox
lrwxr-xr-x 1根轮14 3 28 2016 git - &gt; ../git/bin/git
lrwxr-xr-x 1根轮37 3 28 2016 git-credential-osxkeychain - &gt; ../git/bin/git-credential-osxkeychain
lrwxr-xr-x 1根轮24 3 28 2016 git-cvsserver - &gt; ../git/bin/git-cvsserver
lrwxr-xr-x 1根轮20 3 28 2016 git-shell - &gt; ../git/bin/git-shell
lrwxr-xr-x 1根轮26 3 28 2016 git-upload-pack - &gt; ../git/bin/git-upload-pack
lrwxr-xr-x 1根轮15 3 28 2016 gitk - &gt; ../git/bin/gitk
-rwxr-xr-x 1根轮221128 12 1 15:53 lua
-rwxr-xr-x 1根轮150520 12 1 15:53 luac
-rwxr-xr-x 1根轮2670 11 28 2014 pstorm
-rwxr-xr-x 1根轮1394 3 8 2017 ssh-copy-id
-rwxr-xr-x 1根轮75 11 23 00:40 vbox-img
-rwxr-xr-x 1根轮77 11 23 00:40 vboxwebsrv
lxr:bin wang $ ./lua
Lua 5.3.0版权所有(C)1994-2015 Lua.org,PUC-Rio
&GT;
lxr:bin wang $

1 个答案:

答案 0 :(得分:2)

$ PATH中的前两个字符应该是.:,而不是.;