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
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 (package:pub/src/command_runner.dart:160) <asynchronous suspension> #9 PubCommandRunner.run (package:pub/src/command_runner.dart:117) <asynchronous suspension> #10 main (file:///b/build/slave/dart-sdk-linux- stable/build/sdk/third_party/pkg/pub/bin/pub.dart:8) #11 _startIsolate.<anonymous closure> (dart:isolate- patch/isolate_patch.dart:263) #12 _RawReceivePortImpl._handleMessage (dart:isolate- patch/isolate_patch.dart:151)
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)