Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ubuntu 18.04 : Error: Unable to 'pub upgrade' flutter tool. #25068

Closed
SunLongbri opened this issue Dec 7, 2018 · 12 comments
Closed

Ubuntu 18.04 : Error: Unable to 'pub upgrade' flutter tool. #25068

SunLongbri opened this issue Dec 7, 2018 · 12 comments
Labels
a: china China and its Great Firewall platform-linux Building on or for Linux specifically tool Affects the "flutter" command-line tool. See also t: labels.

Comments

@SunLongbri
Copy link

SunLongbri commented Dec 7, 2018

Steps to Reproduce

export PUB_HOSTED_URL=https://pub.flutter-io.cn
export FLUTTER_STORAGE_BASE_URL=https://storage.flutter-io.cn
git clone -b dev https://github.com/flutter/flutter.git
export PATH="$PWD/flutter/bin:$PATH"
cd ./flutter
  1. ...In the terminal , I input flutter .....
  2. ...At the start,flutter is downing sdk ,and when download complete , output this error.

Logs

heaven@Heaven-Code-Master:~/Development$ flutter
Downloading Dart SDK from Flutter engine 7375a0f414bde4bc941e623482221db2fc8c4ab5...
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100 49.3M  100 49.3M    0     0  2680k      0  0:00:18  0:00:18 --:--:-- 3053k
Building flutter tool...
-------------------Error will encounter -------------------------------
The setter 'readEventsEnabled=' was called on null.
Receiver: null
Tried calling: readEventsEnabled=false
package:pub/src/source/hosted.dart 341:7                                                      BoundHostedSource._throwFriendlyError
package:pub/src/source/hosted.dart 142:7                                                      BoundHostedSource.doGetVersions
===== asynchronous gap ===========================
package:pub/src/source.dart 167:12                                                            BoundSource.getVersions
package:pub/src/solver/package_lister.dart 76:44                                              PackageLister._versions.<fn>.<fn>
dart:async                                                                                    runZoned
package:pub/src/http.dart 272:10                                                              withDependencyType
package:pub/src/solver/package_lister.dart 75:33                                              PackageLister._versions.<fn>
===== asynchronous gap ===========================
dart:async                                                                                    new Future.sync
package:async/src/async_memoizer.dart 43:42                                                   AsyncMemoizer.runOnce
package:pub/src/solver/package_lister.dart 74:58                                              PackageLister._versions
package:pub/src/solver/package_lister.dart 111:21                                             PackageLister.countVersions
===== asynchronous gap ===========================
package:pub/src/solver/version_solver.dart 354:44                                             VersionSolver._choosePackageVersion.<fn>
===== asynchronous gap ===========================
package:pub/src/utils.dart 301:39                                                             minByAsync
===== asynchronous gap ===========================
package:pub/src/solver/version_solver.dart 350:25                                             VersionSolver._choosePackageVersion
===== asynchronous gap ===========================
package:pub/src/solver/version_solver.dart 97:22                                              VersionSolver.solve
===== asynchronous gap ===========================
package:pub/src/solver.dart 35:10                                                             resolveVersions.<fn>
package:pub/src/log.dart 378:18                                                               progress
package:pub/src/solver.dart 32:10                                                             resolveVersions
package:pub/src/entrypoint.dart 200:24                                                        Entrypoint.acquireDependencies
===== asynchronous gap ===========================
package:pub/src/command/upgrade.dart 43:22                                                    UpgradeCommand.run
===== asynchronous gap ===========================
package:args/command_runner.dart 194:27                                                       CommandRunner.runCommand
===== asynchronous gap ===========================
package:pub/src/command_runner.dart 168:39                                                    PubCommandRunner.runCommand.<fn>
dart:async                                                                                    new Future.sync
package:pub/src/utils.dart 109:12                                                             captureErrors.<fn>
dart:async                                                                                    runZoned
package:pub/src/utils.dart 126:5                                                              captureErrors
package:pub/src/command_runner.dart 168:13                                                    PubCommandRunner.runCommand
===== asynchronous gap ===========================
package:pub/src/command_runner.dart 117:11                                                    PubCommandRunner.run
===== asynchronous gap ===========================
/b/build/slave/Linux_Engine/build/src/third_party/dart/third_party/pkg/pub/bin/pub.dart 8:22  main
This is an unexpected error. Please run

    pub --trace upgrade --verbosity=error --no-packages-dir

and include the logs in an issue on https://github.com/dart-lang/pub/issues/new
Error: Unable to 'pub upgrade' flutter tool. Retrying in five seconds... (9 tries left)
@zoechi zoechi added tool Affects the "flutter" command-line tool. See also t: labels. a: china China and its Great Firewall labels Dec 7, 2018
@zoechi zoechi added this to the Goals milestone Dec 7, 2018
@SunLongbri
Copy link
Author

How should I do ?

@SunLongbri
Copy link
Author

I think the reason is :pub enrivonment is not ready , but I don't what to do that make the environment of pub is ready.The computer system I used is Ubuntu 18.04.1LTS.

@zoechi
Copy link
Contributor

zoechi commented Dec 7, 2018

I don't think there is such a thing as an pub environment that needs to get ready.

Could you try to open https://pub.flutter-io.cn/api/packages in the browser and check if you get JSON response back (several pages long)?

@SunLongbri
Copy link
Author

Yes , I can get the Json from browser,and I get the Json is :
next_url | "https://pub.flutter-io.cn/api/packages?page=2"

@SunLongbri
Copy link
Author

I can get lots of pages:I think my computer's network is good.

next_url | "https://pub.flutter-io.cn/api/packages?page=8"

@SunLongbri
Copy link
Author

God , God , I like the language of flutter very much , I hope I can get help to resolve this problem.

@SunLongbri
Copy link
Author

I already resolve this problems , the reason is that I use lantern . And in this way , my network crashed by VPN.

@SunLongbri
Copy link
Author

SunLongbri commented Dec 7, 2018

Thought ,I resolved this problems ,but when I input the 'flutter doctor ',another problem encounter.

heaven@Heaven-Code-Master:~/Development/flutter$ flutter doctor
Doctor summary (to see all details, run flutter doctor -v):
[!] Flutter (Channel dev, v1.0.0, on Linux, locale en_US.UTF-8)
    ✗ Downloaded executables cannot execute on host.
      See https://github.com/flutter/flutter/issues/6207 for more information
      On Debian/Ubuntu/Mint: sudo apt-get install lib32stdc++6
      On Fedora: dnf install libstdc++.i686
      On Arch: pacman -S lib32-libstdc++5

[✓] Android toolchain - develop for Android devices (Android SDK 28.0.3)
[✓] Android Studio (version 3.2)
[!] Connected device
    ! No devices available

! Doctor found issues in 2 categories.

When I input the order 'sudo apt-get install lib32stdc++6'
terminal encounter------>

The following packages have unmet dependencies:
 lib32stdc++6 : Depends: gcc-7-base (= 7.2.0-8ubuntu3.2) but 7.3.0-27ubuntu1~18.04 is to be installed
                Depends: lib32gcc1 (>= 1:4.2) but it is not going to be installed
                Depends: libc6-i386 (>= 2.18) but it is not going to be installed
E: Unable to correct problems, you have held broken packages.

My Computer System :Ubuntu 18.04 64 ,I think I can't install lib32stdc++6 ,because it's 32 .
I think is right?

@FlyAwayL
Copy link

FlyAwayL commented Dec 10, 2018

[!] Flutter (Channel dev, v1.0.0, on Linux, locale en_US.UTF-8)
    ✗ Downloaded executables cannot execute on host.

Maybe you can download Flutter sdk again.

git clone -b dev https://github.com/flutter/flutter.git

@zoechi zoechi added the platform-linux Building on or for Linux specifically label Dec 20, 2018
@zoechi
Copy link
Contributor

zoechi commented Dec 28, 2018

Related to #10335

@zoechi
Copy link
Contributor

zoechi commented Jan 17, 2019

Duplicate of #12301

@zoechi zoechi marked this as a duplicate of #12301 Jan 17, 2019
@zoechi zoechi closed this as completed Jan 17, 2019
@github-actions
Copy link

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.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Aug 14, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
a: china China and its Great Firewall platform-linux Building on or for Linux specifically tool Affects the "flutter" command-line tool. See also t: labels.
Projects
None yet
Development

No branches or pull requests

3 participants