当前位置:网站首页>laravel9本地安裝
laravel9本地安裝
2022-06-30 03:25:00 【yuanzelin8】
安裝要求:
laravel9安裝要求
1.php8.1以上
2.composer
Composer官方下載地址:https://getcomposer.org/
composer global require laravel/installer
先確保Composer的PHP版本為81以上。 運行以上命令安裝laravel安裝管理器。
laravel new 項目名稱
使用該命令安裝一個項目為項目名稱的laravel應用(默認應該是9了,如果不是則指定一下)
如果composer安裝laravel/installer後使用laravel new找不到laravel命令則需要將composer的包安裝路徑設置到環境變量。
通過 Composer 在命令行運行 create-project 命令來安裝 Laravel:
composer create-project laravel/laravel --prefer-dist blog
3.在到此處下載最新的laravel:https://github.com/bestmomo/laravel5-example

laravel9安裝遇到問題解决
問題一:
Laravel訪問出錯錯誤信息:`Warning: require(/vendor/autoload.php): failed to open stream: No such file or dire
錯誤信息:`Warning: require(/http/www.mywakavLee.cn/bootstrap/../vendor/autoload.php): failed to open stream: No such file or directory in /http/www.mywakavLee.cn/bootstrap/autoload.php on line 17
Fatal error: require(): Failed opening required ‘/http/www.mywakavLee.cn/bootstrap/../vendor/autoload.php’ (include_path=’.:/usr/local/lib/php’) in /http/www.mywakavLee.cn/bootstrap/autoload.php on line 17`
原因:網站根目錄下缺少vendor這個存放laraver依賴包的目錄
解决方法:使用composer install進行安裝(沒有安裝過的情况下,以前安裝過的話使用:composer update

問題二:
Laravel :Illuminate\Encryption\MissingAppKeyException No application encryption key has been specifi
Illuminate\Encryption\MissingAppKeyException
No application encryption key has been specified.
http://localhost:8000/
Hide solutions
Your app key is missing
Generate your application encryption key using php artisan key:generate.
問題三:
安裝Laravel打開首頁空白報500錯誤解决方法

把目錄下.env.example改成.env就好
問題四:
Illuminate \ Encryption \ MissingAppKeyException PHP 8.1.7

在.env中加上:
APP_KEY=base64:lnL82E7sweHZfWOmmnUOlBWof62+XGo/aBlfGcm2zXc=
边栏推荐
- Personal PC installation software
- Tidb 6.0: rendre les GRT plus efficaces 丨 tidb Book Rush
- golang bilibili直播彈幕姬
- Usage record of unity input system (instance version)
- 产品思维 | 无人机快递的未来值得期待吗?
- X书6.97版本shield-unidbg调用方式
- zabbix 触发器详解
- Code for generating test and training sets
- Global and Chinese market for nasal drug delivery devices 2022-2028: Research Report on technology, participants, trends, market size and share
- Link garbled escape character
猜你喜欢
随机推荐
What are the defaults for Binding. Mode=Default for WPF controls?
X Book 6.97 shield unidbg calling method
Mathematical solution of Joseph Ring
Shell counts all strings before the last occurrence of a string
WPF initialized event in The reason why binding is not triggered in CS
The next change direction of database - cloud native database
unity input system 使用记录(实例版)
ZABBIX trigger explanation
Link garbled escape character
golang bilibili直播彈幕姬
Global and Chinese market for sensor screwdrivers 2022-2028: Research Report on technology, participants, trends, market size and share
链接乱码转义符
Linked list: insert a node in the head
Redis在windows系统中使用
4-4 beauty ranking (10 points)
Auto.js学习笔记16:按项目保存到手机上,不用每次都保存单个js文件,方便调试和打包
AppData文件夹下Local,Locallow和Roaming
C#【高级篇】 C# 接口(Interface)
JS 字母和数字的相互转换
华为面试题: 高矮个子排队







