From eaa9848fd44802b0622c6b94de06df730ed719a3 Mon Sep 17 00:00:00 2001 From: Chris Bracken Date: Wed, 28 Feb 2018 17:53:38 -0800 Subject: [PATCH] Improve error message for missing 32-bit libstc++ (#15004) Adds more actionable error messages for users of the most common Linux distributions. We could improve this by checking the current distribution and emitting only the appropriate error message. We could further improve that by only emitting the install instructions if we determine the appropriate package is not installed. See: https://github.com/flutter/flutter/issues/6207 --- packages/flutter_tools/lib/src/doctor.dart | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/packages/flutter_tools/lib/src/doctor.dart b/packages/flutter_tools/lib/src/doctor.dart index 1fbc469ca6a..dde9437e17b 100644 --- a/packages/flutter_tools/lib/src/doctor.dart +++ b/packages/flutter_tools/lib/src/doctor.dart @@ -264,10 +264,15 @@ class _FlutterValidator extends DoctorValidator { // Check that the binaries we downloaded for this platform actually run on it. if (!_genSnapshotRuns(genSnapshotPath)) { - messages.add(new ValidationMessage.error( - 'Downloaded executables cannot execute ' - 'on host (see https://github.com/flutter/flutter/issues/6207 for more information)' - )); + final StringBuffer buf = new StringBuffer(); + buf.writeln('Downloaded executables cannot execute on host.'); + buf.writeln('See https://github.com/flutter/flutter/issues/6207 for more information'); + if (platform.isLinux) { + buf.writeln('On Debian/Ubuntu/Mint: sudo apt-get install lib32stdc++6'); + buf.writeln('On Fedora: dnf install libstdc++.i686'); + buf.writeln('On Arch: pacman -S lib32-libstdc++5'); + } + messages.add(new ValidationMessage.error(buf.toString())); valid = ValidationType.partial; }