当前位置:网站首页>Laravel框架安装时遇到的坑
Laravel框架安装时遇到的坑
2022-07-02 16:12:00 【北门牧野】
一、安装composer,我这边是虚拟的Linux系统,所以安装方式有两种:
1.是composer官方给的方法
2.是curl安装。
遇坑的地方就是curl安装的composer,安装完之后需要安装laravel框架
composer create-project --prefer-dist laravel/laravel
但是出现了curl 60报错,如下图
翻了很多解决办法,最后发现了一个能用的,就是下载证书,然后把证书放到指定的文件夹下。
-----下载证书地址:https://curl.se/docs/caextract.html 进入网站之后点击顶部的cacert.pem进行下载。
-----通过命令查看证书位置执行下面的命令,
php -r "print_r(openssl_get_cert_locations());"
-----得到本地证书的位置,如下图
-----找到phpini文件修改里面的内容如下图,修改完成后记得重启一下php
如果一切顺利,到此就可以正常安装Laravel了,当然也有可能遇到以下报错
以上报错的解决办法就是更换composer的镜像源。。。。。希望你能成功!
**
二、使用composer安装好laravel项目之后,就要安装laravel-ide-helper插件了,这里遇到的坑也挺多。
**
composer require barryvdh/laravel-ide-helper 2.6
这个插件的版本要和laravel框架版本吻合,不然会报错,即在执行php artisan ide
时提示
此时需要到框架的vendor目录下看看是否有barryvdh,如果没有那就再执行一次
composer require barryvdh/laravel-ide-helper 2.6
刚好我这里下载的是2.6版本的,所以,应该是吻合的,建议在composer.json中加入红框处内容
"barryvdh/laravel-ide-helper": "^2.6"
至此再执行
php artisan ide
就正常了
然后执行
php artisan ide-helper:gen
lavavel项目那里就会出现下图所示的内容,这时候就可以愉快的享受代码补全了。
如果此文章对你有用,那就太好了。
边栏推荐
- What should we pay attention to in the development process of Yingguang single chip microcomputer?
- 辉芒微IO单片机FT60F010A-URT
- Huimang micro IO MCU ft60f010a-urt
- [nonlinear control theory]7_ High gain and High Frequency
- 读写 XML/JSON/INI 和 UBJSON 等格式的数据文件的统一接口
- 嵌入式 ~ 介绍
- Daily question - "number of daffodils"
- PFC232-SOP8/14/16应广一级可带烧录程序编带
- 台风来袭,多景区暂时关闭,省文旅厅提醒注意安全!
- Problems needing attention in the development and debugging of Yingguang single chip microcomputer
猜你喜欢
MySQL -- basic operation of database
Outsourcing for five years, abandoned
阿里云子账户 - 权限策略 - 授权给某个账户某个 OSS Bucket 的完全控制权限
体验一下阿里云文字识别OCR
Modbus协议通信异常
开发一个禁止删除namespace的控制器
Modbus protocol communication exception
[how is the network connected] Chapter 4 explores access networks and network operators
win10 kms activator
蓝牙技术|物联网的可穿戴设备新工作模式,蓝牙BLE助力新工作模式
随机推荐
Chapter 15 string localization and message Dictionary (1)
HDU - 1114 Piggy Bank (full backpack)
好评率计算
Simple understanding of cardinality sorting
应广单片机003烧录器自定义封装使用技巧
1288_FreeRTOS中vTaskResume()接口以及中断安全版本接口实现分析
Troubleshooting ideas that can solve 80% of faults
[today in history] July 2: BitTorrent came out; The commercial system linspire was acquired; Sony deploys Playstation now
wps插入图片后使图片完整显示
WPS inserts a picture and displays it completely
Editor编辑器扩展在Scene View添加按钮和logo
What should we pay attention to in the development process of Yingguang single chip microcomputer?
[how is the network connected] Chapter 6 requests arrive at the server and respond to the client (end)
怎么可以省去大量的switch语句,省去switch语句
原装应广单片机 MCU芯片PMS152 SOP8封装 单片机开发
Alibaba cloud sub account - Permission Policy - full control permission granted to an account and an OSS bucket
Intelligent hydropower meter energy consumption monitoring cloud platform
[how to connect the network] Chapter 5 explore the server
Yingguang MCU development case
Pms150c Yingguang MCU development case