How does one install the ZIP version of the Dart SDK for linux?


I’m currently setting up the Dart SDK on a 32-bit home server running Ubuntu, but got stuck because of missing documentation for the installation. Google only provides download links for the zipped Dart SDK, and neither their website nor the package contains information about how to correctly set up the product.

So, after copying the files from the bin/ and lib/ directories to the corresponding folders in /, and adding the executables to $PATH, the Dart interpreter seems to work fine, but I get an error while running pub global activate package:

Unhandled exception:
FileSystemException: Cannot open file, path = '/version' (OS Error: No 
such file or directory, errno = 2)
#0      _File.throwIfError (dart:io/file_impl.dart:599)
#1      _File.openSync (dart:io/file_impl.dart:454)
#2      _File.readAsBytesSync (dart:io/file_impl.dart:514)
#3      _File.readAsStringSync (dart:io/file_impl.dart:548)
#4      readTextFile (package:pub/src/io.dart:153)
#5      _getVersion (package:pub/src/sdk.dart:44)
#6      version (package:pub/src/sdk.dart:32)
#7      version (package:pub/src/sdk.dart:32)
#8      PubCommandRunner.runCommand                 
<asynchronous suspension>
#9 (package:pub/src/command_runner.dart:117)
<asynchronous suspension>
#10     main (file:///b/build/slave/dart-sdk-linux-
#11     _startIsolate.<anonymous closure> (dart:isolate-
#12     _RawReceivePortImpl._handleMessage (dart:isolate-

Did I miss any steps?


i think you have to maintain the directory structure after unpacking the zipped sdk.
unzip it in a convenient place and then point the PATH variable to that location.

Answered By – user2884260

Answer Checked By – Candace Johnson (FlutterFixes Volunteer)

Leave a Reply

Your email address will not be published. Required fields are marked *