因此,我从 Bitbucket 导入了另一个项目并尝试使用 php artisan serve
启动它,但我总是收到此错误:
[LogicException]
Key path "file:///var/www/html/DesignViewer5/storage/oauth-private.key" does not
exist or is not readable
我自己做项目的时候没有出现这个错误,我不能运行任何其他命令。我尝试了“php artisan key:generate”,但得到了完全相同的错误。
我试过:composer update
,得到了这个:
Loading composer repositories with package information
Updating dependencies (including require-dev)
Package operations: 0 installs, 1 update, 0 removals
- Updating spatie/laravel-permission (1.11.1 => 1.12.0) Downloading: 100%
Writing lock file
Generating autoload files
> Illuminate\Foundation\ComposerScripts::postUpdate
> php artisan optimize
[LogicException]
Key path "file:///var/www/html/DesignViewer5/storage/oauth-private.key" doe
s not exist or is not readable
Script php artisan optimize handling the post-update-cmd event returned with error code 1
有人知道怎么解决吗?谢谢!
最佳答案
我认为这是由于 Laravel Passport,您应该尝试以下命令:
php artisan passport:install
This command will create the encryption keys needed to generate secure access tokens. In addition, the command will create "personal access" and "password grant" clients which will be used to generate access tokens
关于php - oauth-private.key 不存在或不可读,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/42795011/