我已经在我的电脑上安装了SQLite3,路径为G:\SQLite3\sqlite3.exe
但是,当我在 PowerShell 中输入“sqlite3”(不带引号)时,出现以下错误:
sqlite3 : The term 'sqlite3' is not recognized as the name of a cmdlet, functio
n, script file, or operable program. Check the spelling of the name, or if a pa
th was included, verify that the path is correct and try again.
At line:1 char:1
+ sqlite3
+ ~~~~~~~
+ CategoryInfo : ObjectNotFound: (sqlite3:String) [], CommandNotF
oundException
+ FullyQualifiedErrorId : CommandNotFoundException
Run Code Online (Sandbox Code Playgroud)
我的环境路径包括G:\SQLite3,所以当我在命令提示符(cmd.exe)中运行sqlite3时,它运行得很好。不过,我更喜欢 PowerShell,所以如果有人能给我指出正确的方向,如何让它接受这个命令,我会很高兴。如果这很重要的话,我使用 Windows 8。
该目录很可能G:\SQLite3不在您的PATH环境变量中,因此 PowerShell 不知道在哪里查找可执行文件。使用完整路径运行可执行文件,或将目录添加到$env:PATH:
$env:PATH += ';G:\SQLite3'
& sqlite3.exe
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
12530 次 |
| 最近记录: |