Skip to content

Commit eaa9848

Browse files
authored
Improve error message for missing 32-bit libstc++ (flutter#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: flutter#6207
1 parent a8e0f76 commit eaa9848

File tree

1 file changed

+9
-4
lines changed

1 file changed

+9
-4
lines changed

packages/flutter_tools/lib/src/doctor.dart

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -264,10 +264,15 @@ class _FlutterValidator extends DoctorValidator {
264264

265265
// Check that the binaries we downloaded for this platform actually run on it.
266266
if (!_genSnapshotRuns(genSnapshotPath)) {
267-
messages.add(new ValidationMessage.error(
268-
'Downloaded executables cannot execute '
269-
'on host (see https://github.com/flutter/flutter/issues/6207 for more information)'
270-
));
267+
final StringBuffer buf = new StringBuffer();
268+
buf.writeln('Downloaded executables cannot execute on host.');
269+
buf.writeln('See https://github.com/flutter/flutter/issues/6207 for more information');
270+
if (platform.isLinux) {
271+
buf.writeln('On Debian/Ubuntu/Mint: sudo apt-get install lib32stdc++6');
272+
buf.writeln('On Fedora: dnf install libstdc++.i686');
273+
buf.writeln('On Arch: pacman -S lib32-libstdc++5');
274+
}
275+
messages.add(new ValidationMessage.error(buf.toString()));
271276
valid = ValidationType.partial;
272277
}
273278

0 commit comments

Comments
 (0)