其实这个问题在后来才知道,是composer默认仓库地址被墙的原因,只需要修composer的默认镜像地址即可,

很多朋友在学习Yii2的时候,都要先从网上下载一个Yii2的源码,但是奇怪的是不论是从Github或是Oschina上面拉下来的代码,无论怎样都看不到Vendor目录,这个问题让我痛苦了好久,但是功夫不负有心人,通过学习和研究终于把这家伙给搞下来了,具体的原因貌似是composer镜像地址的原因,我也不是很清楚,有清楚的可以一起聊聊,下面介绍一下具体的步骤,与大家共勉:

一般来说都是通过Composer来安装,关于Composer的一些基础用法在这里不再啰嗦,网上一搜大把大把的,直接上方法

1.线修改composer的镜像地址(就是把默认的镜像地址修改成国内的),打开windows的命令行 输入以下代码

composer config -g repo.packagist composer https://packagist.phpcomposer.com

2.就是按照官方的给的下载方法 输入以下命令

composer create-project --prefer-dist --stability=dev yiisoft/yii2-app-advanced yii2

接着就可以看到熟悉而又亲切的显示(如下)

Installing yiisoft/yii2-app-advanced (dev-master 4ab8ac7d8884e8e959d42c13e8d7cb30ef3475e4)

- Installing yiisoft/yii2-app-advanced (dev-master master): Downloading (100%)

Created project in yii2

Loading composer repositories with package information

Updating dependencies (including require-dev)

Package operations: 64 installs, 0 updates, 0 removals

- Installing yiisoft/yii2-composer (dev-master 248f706): Downloading (100%)

- Installing bower-asset/jquery (3.2.1): Downloading (100%)

- Installing bower-asset/inputmask (3.3.8): Downloading (100%)

- Installing ezyang/htmlpurifier (v4.9.3): Loading from cache

- Installing bower-asset/yii2-pjax (v2.0.6): Loading from cache

- Installing bower-asset/punycode (v1.3.2): Loading from cache

- Installing cebe/markdown (dev-master fcc3253): Downloading (100%)

- Installing yiisoft/yii2 (dev-master 31cbccb): Downloading (100%)

- Installing bower-asset/bootstrap (v3.3.7): Loading from cache

- Installing yiisoft/yii2-bootstrap (dev-master 034d570): Downloading (100%)

- Installing doctrine/lexer (dev-master cc709ba): Loading from cache

- Installing egulias/email-validator (2.1.2): Loading from cache

- Installing swiftmailer/swiftmailer (dev-master 1a2f9df): Downloading (100%)

- Installing yiisoft/yii2-swiftmailer (dev-master 76cd85c): Downloading (100%)

- Installing yiisoft/yii2-debug (dev-master e158aea): Downloading (100%)

- Installing bower-asset/typeahead.js (v0.11.1): Loading from cache

- Installing phpspec/php-diff (dev-master 0464787): Loading from cache

- Installing yiisoft/yii2-gii (dev-master 7d60ee3): Downloading (100%)

- Installing fzaninotto/faker (dev-master a8dbabd): Downloading (100%)

- Installing yiisoft/yii2-faker (dev-master ed09cae): Downloading (100%)

- Installing sebastian/version (dev-master 99732be): Loading from cache

- Installing sebastian/resource-operations (dev-master fadc83f): Loading from cache

- Installing sebastian/object-reflector (dev-master 773f97c): Loading from cache

- Installing sebastian/recursion-context (dev-master a0e54bc): Loading from cache

- Installing sebastian/object-enumerator (dev-master 7cfd9e6): Downloading (100%)

- Installing sebastian/global-state (dev-master e8ba02e): Loading from cache

- Installing sebastian/exporter (dev-master 234199f): Loading from cache

- Installing sebastian/environment (dev-master cd0871b): Loading from cache

- Installing doctrine/instantiator (dev-master 7af8066): Downloading (100%)

- Installing phpunit/php-text-template (1.2.1): Loading from cache

- Installing phpunit/phpunit-mock-objects (dev-master 2f789b5): Downloading (100%)

- Installing phpunit/php-timer (dev-master d107f34): Loading from cache

- Installing phpunit/php-file-iterator (dev-master 3cc8f69): Loading from cache

- Installing theseer/tokenizer (1.1.0): Loading from cache

- Installing sebastian/code-unit-reverse-lookup (dev-master 3488be0): Loading from cache

- Installing phpunit/php-token-stream (dev-master 9a02332): Downloading (100%)

- Installing phpunit/php-code-coverage (dev-master 77a1ba8): Downloading (100%)

- Installing sebastian/diff (1.4.x-dev 7f066a2): Loading from cache

- Installing sebastian/comparator (2.0.0): Loading from cache

- Installing webmozart/assert (dev-master 4a8bf11): Loading from cache

- Installing phpdocumentor/reflection-common (dev-master 21bdeb5): Downloading (100%)

- Installing phpdocumentor/type-resolver (0.4.0): Loading from cache

- Installing phpdocumentor/reflection-docblock (4.1.1): Downloading (100%)

- Installing phpspec/prophecy (dev-master c9b8c60): Downloading (100%)

- Installing phar-io/version (1.0.1): Loading from cache

- Installing phar-io/manifest (dev-master 014fead): Loading from cache

- Installing myclabs/deep-copy (1.x-dev 8e6e041): Loading from cache

- Installing phpunit/phpunit (6.2.x-dev ff3a76a): Downloading (100%)

- Installing symfony/yaml (3.4.x-dev a0e1568): Downloading (100%)

- Installing psr/log (dev-master 4ebe3a8): Loading from cache

- Installing symfony/debug (3.4.x-dev 24964d2): Downloading (100%)

- Installing symfony/polyfill-mbstring (dev-master 7c8fae0): Loading from cache

- Installing symfony/console (3.4.x-dev 90e1e86): Downloading (100%)

- Installing stecman/symfony-console-completion (0.7.0): Loading from cache

- Installing behat/gherkin (dev-master 0069ea0): Downloading (100%)

- Installing symfony/dom-crawler (3.4.x-dev 407a9b9): Downloading (100%)

- Installing symfony/css-selector (3.4.x-dev 0fb45a8): Downloading (100%)

- Installing symfony/browser-kit (3.4.x-dev b75564b): Downloading (100%)

- Installing symfony/event-dispatcher (3.4.x-dev 2766c22): Downloading (100%)

- Installing symfony/finder (3.4.x-dev 985b478): Downloading (100%)

- Installing psr/http-message (dev-master f6561bf): Loading from cache

- Installing guzzlehttp/psr7 (dev-master 811b676): Loading from cache

- Installing codeception/base (2.3.x-dev eb3274a): Downloading (100%)

- Installing codeception/verify (0.3.3): Loading from cache

egulias/email-validator suggests installing ext-intl (PHP Internationalization Libraries are required to use the SpoofChecking validation)

sebastian/global-state suggests installing ext-uopz (*)

phpunit/php-code-coverage suggests installing ext-xdebug (^2.5.5)

phpunit/phpunit suggests installing phpunit/php-invoker (^1.1)

phpunit/phpunit suggests installing ext-xdebug (*)

symfony/console suggests installing symfony/process ()

symfony/console suggests installing symfony/lock ()

symfony/browser-kit suggests installing symfony/process ()

symfony/event-dispatcher suggests installing symfony/dependency-injection ()

symfony/event-dispatcher suggests installing symfony/http-kernel ()

codeception/base suggests installing codeception/specify (BDD-style code blocks)

codeception/base suggests installing flow/jsonpath (For using JSONPath in REST module)

codeception/base suggests installing phpseclib/phpseclib (for SFTP option in FTP Module)

codeception/base suggests installing league/factory-muffin (For DataFactory module)

codeception/base suggests installing league/factory-muffin-faker (For Faker support in DataFactory module)

codeception/base suggests installing symfony/phpunit-bridge (For phpunit-bridge support)

Writing lock file

Generating autoload files

O(∩_∩)O哈哈~ 看到这些 意味着您的Yii2已经安装成功了

php yii vendor,Yii2的安装--解决无Vendor目录的问题相关推荐

  1. mysql8.0.18ZIP版下载与安装(以及无my-default.ini文件和data文件夹的解决方法)

    mysql8.0.18ZIP版下载与安装(以及无my-default.ini文件和data文件夹的解决方法) 参考文章: (1)mysql8.0.18ZIP版下载与安装(以及无my-default.i ...

  2. 技嘉H370 HD3主板的物理机上安装 Linux CentOS7 解决无网卡驱动

    技嘉H370 HD3主板的物理机上安装 Linux CentOS7 解决无网卡驱动 一般的机器网卡驱动会随Linux系统一起安装,但有些奇葩的主板的网卡驱动Linux安装包没有,这就得找到它的网卡驱动 ...

  3. 无网络访问权限怎么办_解决无Internet访问权限

    有的时候我们会遇到"无Internet访问权限"的问题,但如果不会解决的话该怎么办呢?这个问题好解决,不是大事,因为小编我知道呢.所以接下来小编就要开始自立舞台开始我的演讲啦.你们 ...

  4. linux点亮硬盘灯命令 简书,威联通NAS交流学习:用虚拟机安装荒野无灯大佬的精简win10系统...

    威联通NAS交流学习:用虚拟机安装荒野无灯大佬的精简win10系统 2020-02-08 10:31:01 42点赞 392收藏 54评论 创作立场声明:学习交流为主,如有问题欢迎探讨~我是快乐肥宅一 ...

  5. 无盘服务器回写盘intel,无盘回写盘碎片清理工具 完美解决无盘回写盘碎片

    本无盘回写碎片清理工具可完美解决无盘回写盘碎片,安装完毕本软件设置一下即可实现回写盘碎片的自动清理,不错吧??提示:适用于锐起,锐腾无盘回写清理! 回写盘自动清理会自动格式化指定的盘(支持多个盘,块大 ...

  6. Yii2 composer安装asset packagist 再提速 静态资源安装

    很久以前有一篇文章专门介绍如何提速,Yii2 composer安装慢的解决办法 由于网络原因从 https://asset-packagist.org 下载包信息便成为了最大瓶颈.可能这个上面的包比较 ...

  7. WIN10安装vc60无响应

    Win10 安装vc60无响应,提示安装不成功.解决方法: 直到这一步,这一步很关键,点击数据访问 ,右侧点击更改选项 来到下面这一步,按图取消后,点OK,在点击Continue 最后一路顺畅到底.

  8. linux无显卡安装教程,无光驱无计算机显卡如何安装Linux.doc

    无光驱无显卡如何安装Linux ――汪翰林 02322 1 现象和问题描述 监控DM组件的服务器为我司的SC1240服务器,该服务器无光驱和显卡,虽然有USB口,但每次安装操作系统的时候在读取USB光 ...

  9. charles 手机安装证书无下载提示

    1. 手机通过charles 提示浏览器收入chls.pro/ssl 无弹框提示,可能造成的原因是,在手机上配置完代理后,第一次进行网络访问, 这时charles会出现一个提示,大体上意思是,是否允许 ...

  10. Ubuntu 16.04+GTX970 黑屏无法安装解决方法

    Ubuntu 16.04+GTX970 黑屏无法安装解决方法 参考http://www.linuxidc.com/Linux/2017-01/139318.htm http://blog.scienc ...

最新文章

  1. window.open的小技巧分享(转)
  2. WCF+Silverlight部署本机备忘
  3. Linux内核--异常和中断的区别
  4. 算法自动化测试的挑战与思考
  5. python上下文管理关键字_详解 Python 中的 with 与 上下文管理器
  6. kafka常用命令及问题解决
  7. OpenCV_Python教程 系列!
  8. python fillna,Pandas之Fillna填充缺失数据的方法
  9. java信号量源代码_Java信号量Semaphore原理及代码实例
  10. ASP.Net学习笔记012--12ViewState初探
  11. H5网页等链接被微信秒封(拦截、屏蔽、和谐)后最好的解决方法
  12. Java、JSP网上购物系统
  13. css 实现一个尖角_请用CSS实现一个带尖角的正方形
  14. idea 配置 tomcat session 无法活化
  15. (三)Linux 用户和权限
  16. pyqt5+qt desiger实例教程(1)创建含有三个按钮的窗口,点击按钮2输出消息、按钮3可退出
  17. C# 使用一个timer实现转圈圈屏保
  18. div html 下边加横线_CSS如何给文字添加下划线样式?
  19. 湖南工程学院软件测试期末考试,(完整word版)湖南工程学院_高等数学试卷(A卷).doc...
  20. Java *2.20(金融应用程序:计算利息)如果知道余额和年利率百分比,就可以使用下面的公式计算下个月的利息:利息 = 余额 * (年利率百分比 / 1200)

热门文章

  1. CentOS配置Tomcat开机启动
  2. Linux系统文件管理以及连接文件和inode简介
  3. 网页小工具(学习中国象棋)
  4. HDOJ 1035 模拟 水
  5. 智能平台管理接口 (IPMI)
  6. chrome自动发送邮件插件
  7. 向真正Java高手请教ant构建工具的类装载器问题
  8. Java中的>>,>>>
  9. PHP学习笔记四(超级全局变量 和 魔术常量)
  10. 模拟串口收发数据Configure Virtual Serial Port Driver(VSPD)