2

The Bash Commands in Dart Documentation to install it's sdk is for Ubuntu (using apt-get). I used dnf install dart but it returned the followig error:

 No match for argument: dart
    Error: Unable to find a match

I'm using Fedora 29.

3 Answers3

5

No need to build from source:-

You can Use this archive to download specific versions of the Dart SDK and the Dart API documentation. Dart SDK Archive

3

I know this question is 10 months old, but this worked for me. As for RPM-based distributions, according to my understanding, Dart is not available for installation through a software repository, so you need to build it from the source.

As somebody has suggested above, if you consult the official documentation, you're on the right tracks. Pay attention that you might want to install Python 2 on your system if you're running later versions of Fedora which dropped support for it.

$ sudo dnf install python2 -y

Next, just go top to bottom instruction-wise

$ sudo dnf install git subversion make gcc-c++ -y
$ git clone https://chromium.googlesource.com/chromium/tools/depot_tools.git
$ export PATH=$PATH:`pwd`/depot_tools
$ mkdir dart-sdk && cd dart-sdk && fetch dart

This operation might take some time. Lastly, build the 64-bit SDK

$ cd dart-sdk/sdk && ./tools/build.py --mode release --arch x64 create_sdk

Upon completion, the SDK should be available in out/ReleaseX64/dart-sdk directory.

1

Use following code:

$ ./tools/build.py --no-goma --mode release --arch x64 create_sdk

Instead of:

$ ./tools/build.py --mode release --arch x64 create_sdk
ayaz
  • 11