I'm new in lumen and i have done
composer clear-cache
then after
composer update
to install some package after configurating composer.json however i have got this error:
[Composer\Downloader\TransportException]
The "http://packagist.org/p/phpunit/php-timer%24be3efc71adf134c858c1add0117
f060f4ab545fe9d357983c7bea165b2008d65.json" file could not be downloaded: p
hp_network_getaddresses: getaddrinfo failed: Name or service not known
failed to open stream: php_network_getaddresses: getaddrinfo failed: Name o
r service not known
Plase how could i fix this error
This issue was posted about 2 years ago but I wanna answer this problem so no one should have difficulty like me.
First open /etc/resolv.conf
(if you using Ubuntu distributions, the file is /etc/resolvconf/resolv.conf.d/head)
# cat /etc/resolve.conf
And after that, write this rows to the file:
# Google's public DNS servers nameserver 8.8.8.8 # Primary DNS server nameserver 8.8.4.4 # Secondary DNS server
These are the Google's public DNS servers as mentioned in the code above.
Save and close.
After restart the network service using this command:
service network restart
This solved my problem.
Hope help to others...
I fixed the issue on Linux/Centos6 (Plesk Onyx) by:
Opening /etc/resolv.conf (my file was empty)
Added: nameserver 8.8.8.8 nameserver 8.8.4.4
options rotate options timeout:3
Hopefully this helps someone out there.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With