laravel 安装获取 key 在 ubuntu 操作系统中生成错误

标签 laravel ubuntu installation

我正在安装“Laravel Framework 版本 5.2.26”,但我在我的 ubuntu 操作系统中收到 key 生成错误

user@CN43:/var/www/html/laravel_1$ php artisan key:generate

  [ErrorException]                                                             
  file_get_contents(/var/www/html/laravel_1/.env): failed to open stream: No   
  such file or directory

所以我检查了目录 .env 文件不存在但是 .env.example 文件只在那里所以我创建了那个文件并更新数据库名称,数据库用户名,数据库密码之后“php artisan key:generate”命令起作用该 key 生成超过 32 个字符,它得到 [base64:somethingsstrings with above 32 characters] 我认为存在一些安装问题。

我的 Laravel 网站打不开。我做错了什么?

最佳答案

.env.example 重命名为 .env 并填写所有属性。

If you install Laravel via Composer, this file will automatically be renamed to .env. Otherwise, you should rename the file manually

https://laravel.com/docs/5.0/configuration#environment-configuration

关于laravel 安装获取 key 在 ubuntu 操作系统中生成错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/36276767/

相关文章:

python - ValueError : numpy. dtype 大小错误,尝试重新编译

node.js - Azure Pipeline - 使用 Azure Feed 进行 npm 安装错误 403

mysql - 如何根据3种关系选择表中的项目?

php - array_key_exists() 错误/编辑供应商文件

linux - Vim 编辑器始终打开用户主目录

php - 如何在 Ubuntu 中安装 PHP GD

Laravel 5.2 快速入门指南给出 Not Found 错误

php - 如何在 SPhinxql 查询生成器中设置匹配模式

shell - ubuntu中是否有一个名为 'screen_it'的命令?

installation - 当软件包已安装时 msiexec 安静安装