0

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...

9
  • Better say: are you on local host? Seems something is blocking composer from getting to the site. If it's not your local site, then it may be company firewall. Commented Feb 6, 2015 at 13:21
  • The issue is your question misleads reader: really your composer doesn't work at all due to some net problems Commented Feb 6, 2015 at 13:28
  • 1
    Just run composer diagnoseto diagnose any problems you or your network have Commented Feb 6, 2015 at 13:29
  • @Lambrusco It is on my local host. Using company unrestricted internet though. But I will try again from home later just to be sure. Commented Feb 6, 2015 at 13:31
  • @acrobat I get Checking http connectivity: FAIL and I think it fails on the Checking composer version as well as it leaves that blank Commented Feb 6, 2015 at 13:34

2 Answers 2

2

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.

Sign up to request clarification or add additional context in comments.

2 Comments

Thank you for answering but would you elaborate /give steps for answer . I have now similar issue.
@ikuchris Go to "Internet properties" and select "Connection" tab. Click on "Lan settings" and uncheck "Use a proxy server for your LAN".
0

For Linux users (Centos 6,7) Check your name servers that you have in /etc/resolv.conf working properly with the below command

nslookup www.google.com

If it is not working used the google public name server at 8.8.8.8 and 8.8.4.4

nameserver 8.8.8.8
nameserver 8.8.4.4

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.