安装laravel依赖与作曲家不工作 [英] installing laravel dependencies with composer not working

查看:364
本文介绍了安装laravel依赖与作曲家不工作的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试使用本指南安装Laravel Excel / p>

我已经在我的composer.json中包含了这个行;

 需要:{
laravel / framework:4.2。*,
maatwebsite / excel:1. *
},

然后我尝试使用命令 composer update 更新作曲者。这导致以下消息....

 警告:这个作曲家的开发构建是超过30天。建议通过运行/ usr / local / bin / composer self-update来更新它以获取最新版本。 

加载包信息的作曲家资料库

无法下载https://packagist.org/packages.json文件:php_network_getaddresses:getaddrinfo failed:名称或服务不知道

无法打开流:php_network_getaddresses:getaddrinfo失败:名称或服务未知

https://packagist.org无法完全加载,包信息已加载从本地缓存可能已经过时

更新依赖关系(包括require-dev)

[Composer\Downloader\TransportException]
http ://packagist.org/p/jeremeamia/functionparser$cac3105ac0ad3f9a0f9c9ccabcde36787c8d8f404a003fa47900f84cee475a34.json文件无法下载:php_

network_getaddresses:getaddrinfo failed:名称或服务未知
无法打开流:php_network_getaddresses:getaddrinfo failed:名称或服务未知

更新[--prefer-source] [--prefer-dist] [--dry-run] [--dev] [ --no-dev] [--lock] [--no-plugins] [--no-custom-installers] [--no-scripts] [--no-progress] [--with-dependencies] [ - v | vv | vvv | --verbose] [-o | --optimize-autoloader] [--ignore-platform-reqs] [packages1] ... [packagesN]
/ pre>

当我尝试自己更新作曲者(按警告消息建议)我得到以下内容:

  [Composer\Downloader\TransportException] 
无法下载https://getcomposer.org/version文件:php_network_getaddresses:getaddrinfo failed:Name或服务不知道
无法打开流:php_network_getaddresses:getaddrinfo失败:名称或服务未知

所以我的第一个问题是我无法更新作曲家。



我的第二个问题是,我不认为Laravel Excel已经安装,因为我看不到它在供应商/ laravel目录在任何地方(不是所有的依赖关系通常存储在哪里?)



我是一个完整的初学者,当涉及到使用作曲家和安装依赖关系,我甚至没有真的甚至使用一个JSON文件,直到现在,所以真的很挣扎在这里...

解决方案

我遇到同样的问题。后来,我知道我的代理不允许我更新作曲家。所以,检查您的代理设置。


I'm trying to install Laravel Excel using this guide

I have included the line in my composer.json;

"require": {
    "laravel/framework": "4.2.*",
    "maatwebsite/excel": "1.*"
},

I am then attempting to update composer using the command composer update. This results in the following messages....

Warning: This development build of composer is over 30 days old. It is recommended to update it by running "/usr/local/bin/composer self-update" to get the latest version.

Loading composer repositories with package information

The "https://packagist.org/packages.json" file could not be downloaded: php_network_getaddresses: getaddrinfo failed: Name or service not known

failed to open stream: php_network_getaddresses: getaddrinfo failed: Name or service not known

https://packagist.org could not be fully loaded, package information was loaded from the local cache and may be out of date

Updating dependencies (including require-dev)

[Composer\Downloader\TransportException]
The "http://packagist.org/p/jeremeamia/functionparser$cac3105ac0ad3f9a0f9c9ccabcde36787c8d8f404a003fa47900f84cee475a34.json" file could not be downloaded: php_

network_getaddresses: getaddrinfo failed: Name or service not known
  failed to open stream: php_network_getaddresses: getaddrinfo failed: Name or service not known

update [--prefer-source] [--prefer-dist] [--dry-run] [--dev] [--no-dev] [--lock] [--no-plugins] [--no-custom-installers] [--no-scripts] [--no-progress] [--with-dependencies] [-v|vv|vvv|--verbose] [-o|--optimize-autoloader] [--ignore-platform-reqs] [packages1] ... [packagesN]

When I try to self-update composer (as recommended in the warning message) I get the following;

[Composer\Downloader\TransportException]
  The "https://getcomposer.org/version" file could not be downloaded: php_network_getaddresses: getaddrinfo failed: Name or service not known
  failed to open stream: php_network_getaddresses: getaddrinfo failed: Name or service not known

So my first problem is that I cannot update composer.

My second problem is that I do not think Laravel Excel has been installed because I cannot see it in the vendor/laravel directory anywhere (isn't that where all the dependencies are usually stored?)

I am a complete beginner when it comes to using composer and installing dependencies and I've not really even used a JSON file before until now so really struggling here...

解决方案

I had faced the same problem. Later, I came to know that my proxy not allowing me to update the composer. So, check your proxy settings.

这篇关于安装laravel依赖与作曲家不工作的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆