Closed 2yanyi closed 5 years ago
Presumably this is an access error to pub.dartlang.org which is causing a cascading failure? Which means there are several things wrong. @mit-mit
i have a problem,please help!
junludeMBP:~ Javen$ flutter doctor Building flutter tool... Got socket error trying to find package coverage at https://pub.dartlang.org. Error: Unable to pub upgrade flutter tool. Retrying in five seconds... Connection failed (OS Error: No route to host, errno = 65), address = storage.googleapis.com, port = 443 Error: Unable to pub upgrade flutter tool. Retrying in five seconds...
@eseidelGoogle thank you very much
If you're in China, please try https://github.com/flutter/flutter/wiki/Using-Flutter-in-China and let us know if that doesn't work.
Thanks! it works! @eseidelGoogle
These are all probably dupes of each other: https://github.com/flutter/flutter/issues/12301 https://github.com/flutter/flutter/issues/12702 https://github.com/flutter/flutter/issues/13222 https://github.com/flutter/flutter/issues/13349
Check http_proxy or system wide proxy have setting. remove the proxy setting. My Ubuntu 16.04, got this error. After remove the proxy setting everything go well.
still get the error when i export PUB_HOSTED_URL=https://pub.flutter-io.cn export FLUTTER_STORAGE_BASE_URL=https://storage.flutter-io.cn then i run the example of hello_world Running "flutter packages get" in hello_world...
ERR : Connection failed (OS Error: No route to host, errno = 65), address = storage.googleapis.com, port = 443
that will make me give up .......
@linguowu Can you run the default app created by flutter create
?
@InMatrix when i run "flutter create myapp" it shows below:
Running "flutter packages get" in myapp...
Got socket error trying to find package cupertino_icons at https://pub.dartlang.org.
@linguowu It looks like the environmental variables were not working. Can you provide the following information for diagnostic purposes:
echo $PUB_HOSTED_URL
echo $FLUTTER_STORAGE_BASE_URL
ls ~/.pub-cache/hosted
flutter doctor -v
Also, did you use the mirror to install Flutter?
Thank you for your patience.
@InMatrix how to get the mirror to install Flutter?
below is the output for diagnostic: `country5deMacBook-Pro-2:~ country5$ echo $PUB_HOSTED_URL
country5deMacBook-Pro-2:~ country5$ echo $FLUTTER_STORAGE_BASE_URL
country5deMacBook-Pro-2:~ country5$ ls ~/.pub-cache/hosted pub.dartlang.org pub.flutter-io.cn
country5deMacBook-Pro-2:~ country5$ flutter doctor -v
[ +14 ms] [/Users/country5/flutter/] git rev-parse --abbrev-ref --symbolic @{u}
[ +28 ms] Exit code 0 from: git rev-parse --abbrev-ref --symbolic @{u}
[ ] origin/alpha
[ ] [/Users/country5/flutter/] git rev-parse --abbrev-ref HEAD
[ +8 ms] Exit code 0 from: git rev-parse --abbrev-ref HEAD
[ ] alpha
[ ] [/Users/country5/flutter/] git ls-remote --get-url origin
[ +8 ms] Exit code 0 from: git ls-remote --get-url origin
[ ] https://github.com/flutter/flutter.git
[ ] [/Users/country5/flutter/] git log -n 1 --pretty=format:%H
[ +6 ms] Exit code 0 from: git log -n 1 --pretty=format:%H
[ ] 2e449f06f0a3be076e336ad6b30b0e9ec99dbdfe
[ ] [/Users/country5/flutter/] git log -n 1 --pretty=format:%ar
[ +6 ms] Exit code 0 from: git log -n 1 --pretty=format:%ar
[ ] 9 days ago
[ ] [/Users/country5/flutter/] git describe --match v*.*.* --first-parent --long --tags
[ +7 ms] Exit code 0 from: git describe --match v*.*.* --first-parent --long --tags
[ ] v0.0.21-0-g2e449f0
[ +135 ms] /usr/bin/defaults read /Applications/Android Studio.app/Contents/Info CFBundleShortVersionString
[ +61 ms] Exit code 0 from: /usr/bin/defaults read /Applications/Android Studio.app/Contents/Info CFBundleShortVersionString
[ ] 3.0
[ +129 ms] [✓] Flutter (on Mac OS X 10.12 16A323, locale zh-Hans-CN, channel alpha)
[ ] • Flutter version 0.0.21 at /Users/country5/flutter
[ ] • Framework revision 2e449f06f0 (9 days ago), 2018-01-29 14:26:51 -0800
[ ] • Engine revision 6921873c71
[ ] • Tools Dart version 2.0.0-dev.16.0
[ ] • Engine Dart version 2.0.0-edge.da1f52592ef73fe3afa485385cb995b9aec0181a
[ +6 ms] /usr/bin/defaults read /Applications/Android Studio.app/Contents/Info CFBundleShortVersionString
[ +59 ms] Exit code 0 from: /usr/bin/defaults read /Applications/Android Studio.app/Contents/Info CFBundleShortVersionString
[ ] 3.0
[ +64 ms] java -version
[ +63 ms] [✓] Android toolchain - develop for Android devices (Android SDK 26.0.2)
[ ] • Android SDK at /Users/country5/Development/android-sdk-macosx
[ ] • Android NDK at /Users/country5/Development/android-sdk-macosx/ndk-bundle
[ ] • Platform android-26, build-tools 26.0.2
[ ] • Java binary at: /Applications/Android Studio.app/Contents/jre/jdk/Contents/Home/bin/java
[ ] • Java version OpenJDK Runtime Environment (build 1.8.0_152-release-915-b08)
[ +99 ms] DevToolsSecurity -status
[ +31 ms] Developer mode is currently enabled.
[ ] python -c import six
[ +35 ms] idevice_id -h
[ +6 ms] idevice_id -h
[ +4 ms] idevice_id -l
[ +14 ms] ideviceinstaller -h
[ +6 ms] ios-deploy --version
[ +11 ms] ios-deploy --version
[ +9 ms] 1.9.2
[ ] ios-deploy --version
[ +8 ms] ios-deploy --version
[ +10 ms] 1.9.2
[ +1 ms] pod --version
[ +276 ms] pod --version
[ +276 ms] 1.3.1
[ +1 ms] pod --version
[ +267 ms] 1.3.1
[ ] [-] iOS toolchain - develop for iOS devices (Xcode 8.0)
[ ] • Xcode at /Applications/Xcode.app/Contents/Developer
[ ] • Xcode 8.0, Build version 8A218a
[ ] ✗ Flutter requires a minimum Xcode version of 9.0.0.
Download the latest version or update via the Mac App Store.
[ ] • ios-deploy 1.9.2
[ ] • CocoaPods version 1.3.1
[ +1 ms] [✓] Android Studio (version 3.0)
[ ] • Android Studio at /Applications/Android Studio.app/Contents
[ ] • Java version OpenJDK Runtime Environment (build 1.8.0_152-release-915-b08)
[ +21 ms] /Users/country5/Development/android-sdk-macosx/platform-tools/adb devices -l
[ +13 ms] Exit code 0 from: /Users/country5/Development/android-sdk-macosx/platform-tools/adb devices -l
[ ] List of devices attached
ENU7N15A30000390 device usb:337641472X product:angler model:Nexus_6P device:angler transport_id:2
[ +7 ms] idevice_id -h
[ +18 ms] /Users/country5/Development/android-sdk-macosx/platform-tools/adb -s ENU7N15A30000390 shell getprop
[ +64 ms] ro.hardware = angler
[ ] ro.build.characteristics = nosdcard
[ +2 ms] [✓] Connected devices
[ ] • Nexus 6P • ENU7N15A30000390 • android-arm • Android 8.1.0 (API 27)
[ +14 ms] "flutter doctor" took 1,664ms.
[ +100 ms] ensureAnalyticsSent: 98ms
[ +2 ms] exiting with code 0`
@linguowu given the output of the ECHO commands you have is empty it looks like those variable were not correctly exported/set. You need to make sure they are set before running the flutter command. See https://github.com/flutter/flutter/wiki/Using-Flutter-in-China for details.
@linguowu In addition to what @mit-mit said, you can persist these environment variables by adding these export commands to $HOME/.bash_profile
and then source $HOME/.bash_profile
.
D:\flutter\flutter>flutter doctor Updating flutter tool... Error: Unable to 'pub upgrade' flutter tool. Retrying in five seconds...
Waiting for 0 seconds, press CTRL+C to quit ... Error: Unable to 'pub upgrade' flutter tool. Retrying in five seconds...
Waiting for 3 seconds, press CTRL+C to quit ... Terminate batch job (Y/N)? y
and the environment variables is added: D:\flutter\flutter>echo %FLUTTER_STORAGE_BASE_URL% https://storage.flutter-io.cn
D:\flutter\flutter>echo %PUB_HOSTED_URL% https://pub.flutter-io.cn
Duplicate of #12301
hi go to the bios and change vm (Virtual machine) from disable to enable. you want to run emulator so its Necessary.
This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug, including the output of flutter doctor -v
and a minimal reproduction of the issue.
环境搭建遇到错误