我試圖使用this guide安裝laravel依賴與作曲家不工作
我已經包含在我的composer.json線安裝Laravel Excel的;
"require": {
"laravel/framework": "4.2.*",
"maatwebsite/excel": "1.*"
},
我然後嘗試使用命令composer update
更新作曲家。這將導致以下消息...。
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]
當我嘗試自我更新作曲家(按警告消息中的建議)時,我得到以下內容;
[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
所以我的第一個問題是我不能更新作曲家。
我的第二個問題是,我不認爲Laravel Excel中已經安裝了,因爲我不能看到它的供應商/ laravel目錄的任何地方(是不是說,所有的依賴關係通常存儲?)
我一個完整的初學者,當涉及到使用作曲家和安裝依賴關係,我甚至沒有真正使用JSON文件,直到現在才真正在這裏苦苦掙扎......
更好地說:你在本地主機?似乎有東西阻止作曲家進入該網站。如果它不是您的本地站點,那麼它可能是公司防火牆。 – Lambrusco 2015-02-06 13:21:31
這個問題是你的問題誤導讀者:真的,你的作曲家根本不工作,由於一些淨問題 – Lambrusco 2015-02-06 13:28:21
只需運行'作曲家診斷'來診斷你或你的網絡有任何問題 – acrobat 2015-02-06 13:29:39