Package Details: flutter 2.10.5-1

Git Clone URL: https://aur.archlinux.org/flutter.git (read-only, click to copy)
Package Base: flutter
Description: A new mobile app SDK to help developers and designers build modern mobile apps for iOS and Android.
Upstream URL: https://flutter.dev
Keywords: android fuchsia ios mobile sdk
Licenses: custom, BSD, CCPL
Submitter: flipflop97
Maintainer: frealgagu
Last Packager: frealgagu
Votes: 97
Popularity: 6.69
First Submitted: 2017-06-05 21:03 (UTC)
Last Updated: 2022-05-04 19:26 (UTC)

Dependencies (12)

Sources (3)

Pinned Comments

cfujino commented on 2021-11-12 20:52 (UTC)

they put Dart in the Flutter archive for some reason

Yes, the reason is that breaking changes to the Dart SDK are landed with the corresponding fixes to the Flutter SDK. Also, you cannot "remove it" without significantly altering the Flutter tooling. The Flutter CLI tool ensures that the pinned version of the Dart SDK is present in its binary cache.

If you want to use a version of Flutter without depending on Flutter's pinned version of the Dart SDK, you would need to maintain a separate fork of the Flutter SDK, that tracks the breaking changes of the Arch Dart package, and has an updated Flutter tool that doesn't assume it controls the Dart installation.

frealgagu commented on 2020-12-05 22:36 (UTC)

I maintain the latest built package at:

https://github.com/frealgagu/archlinux.flutter/releases/

Latest Comments

laclica commented on 2022-05-05 12:34 (UTC)

@ricardosimoes i also got the same error and did the same to fix it. ^_^

bacteriostat commented on 2022-05-05 11:18 (UTC) (edited on 2022-05-05 11:18 (UTC) by bacteriostat)

@ricardosimoes I also encountered the same issue on Arch, did the same thing you did.

ricardosimoes commented on 2022-05-05 11:13 (UTC)

Got error: failed to commit transaction (conflicting files) flutter: /opt/flutter/.git/FETCH_HEAD exists in filesystem on MANJARO, but I ran sudo mv /opt/flutter/.git/FETCH_HEAD /opt/flutter/.git/FETCH_HEAD.bak and then it built fine

ArchUser01020 commented on 2022-04-15 21:08 (UTC) (edited on 2022-04-15 21:09 (UTC) by ArchUser01020)

Solution to mkdir: cannot create directory ‘/opt/flutter/bin/cache’: Permission denied
You need to run the command to add your user to the group.
Run gpasswd -a <user> flutterusers

bacteriostat commented on 2022-04-14 12:20 (UTC) (edited on 2022-04-14 12:21 (UTC) by bacteriostat)

Not sure if this is an issue but flutter doctor started giving me this error:

fatal: unsafe repository ('/opt/flutter' is owned by someone else) To add an exception for this directory, call:

git config --global --add safe.directory /opt/flutter

Which is true because /opt/flutter is owned by root.

The solution mentioned in the error works though.

Skar3 commented on 2022-04-02 12:53 (UTC) (edited on 2022-04-02 12:54 (UTC) by Skar3)

Running flutter doctor i get this error: Flutter failed to check for directory existence at "/root/.pub-cache/hosted/pub.dartlang.org/_fe_analyzer_shared-31.0.0/lib/". Please ensure that the SDK and/or project is installed in a location that has read/write permissions for the current user. Try running: sudo chown -R $(whoami) /root/.pub-cache/hosted/pub.dartlang.org/_fe_analyzer_shared-31.0.0

Any suggestion?

celogeek commented on 2022-01-25 09:51 (UTC)

Hello

When I try to do this as a user (deps for another package):

flutter config --enable-web
mkdir: cannot create directory ‘/opt/flutter/bin/cache’: Permission denied

is it possible to change the cache directory somewhere else ?

whoami commented on 2021-12-16 22:39 (UTC) (edited on 2021-12-16 22:40 (UTC) by whoami)

btw, 2.8.1 already. And I wanna show you my update function without AUR pkg.

u() {
  # ...
  asdf update
  asdf plugin update --all
  asdf install flutter latest
  asdf global flutter latest
  export DART_SDK=$(asdf where flutter)/bin/cache/dart-sdk
  # ...
}

Also you can upgrade flutter over flutter (if you install it from flutter.dev) - flutter upgrade and even flutter downgrade, also you can change channel for upgrade/downgrade (example flutter channel {stable|beta|dev|master}; flutter upgrade) https://docs.flutter.dev/development/tools/sdk/upgrading

vmasdani commented on 2021-12-16 03:24 (UTC)

thank you for the 2.8 update @frealgagu

frealgagu commented on 2021-12-15 17:44 (UTC)

@romjan1412 a little busy with zero-day log4j vulnerability. But it's now up to date (2.8.0).

whoami commented on 2021-12-15 01:53 (UTC)

By the way, you can use asdf-vm with flutter plugin or https://fvm.app to install latest flutter without delays

vmasdani commented on 2021-12-13 02:11 (UTC) (edited on 2021-12-13 02:14 (UTC) by vmasdani)

just a heads up 2.8 is released now

romjan1412 commented on 2021-12-12 04:47 (UTC)

why this is not updated yet?

romjan1412 commented on 2021-11-16 17:37 (UTC)

/opt/flutter/bin/internal/shared.sh: line 229: /opt/flutter/bin/cache/dart-sdk/bin/dart: No such file or directory

i'm peacefully using flutter! but after few days of break this error comes up!

cfujino commented on 2021-11-12 20:52 (UTC)

they put Dart in the Flutter archive for some reason

Yes, the reason is that breaking changes to the Dart SDK are landed with the corresponding fixes to the Flutter SDK. Also, you cannot "remove it" without significantly altering the Flutter tooling. The Flutter CLI tool ensures that the pinned version of the Dart SDK is present in its binary cache.

If you want to use a version of Flutter without depending on Flutter's pinned version of the Dart SDK, you would need to maintain a separate fork of the Flutter SDK, that tracks the breaking changes of the Arch Dart package, and has an updated Flutter tool that doesn't assume it controls the Dart installation.

whoami commented on 2021-11-10 10:12 (UTC)

Yes it blows my mind, they put Dart in the Flutter archive for some reason. I think we can safely remove it from there and use the system Dart

tiziodcaio commented on 2021-11-10 10:06 (UTC)

Cannot we use dart package instead of downloaded dark sdk from flutter?

Nesaijn commented on 2021-10-23 20:24 (UTC)

@Rodancoci One should note that a restart of the computer is needed to make the change take effect.

frealgagu commented on 2021-10-11 13:38 (UTC)

@Rodancoci I compile my packages in a clean chroot and those packages are not needed to be specified in the PKGBUILD. Glu is a dependency of this package and it requires ninja and clang (check). It's strange that you didn't have those packages already installed.

Rodancoci commented on 2021-10-11 07:14 (UTC)

Figured it out. clang and ninja should be added as makedeps.

Rodancoci commented on 2021-10-11 07:11 (UTC)

The proper way to avoid the /opt/flutter/bin/cache permission error is to add the current user to the flutterusers group created by the flutter package. The flutter directory is owned by the root user and the flutterusers group.

usermod -aG flutterusers <user>

I'm getting a new error now, though:

CMake Error: CMake was unable to find a build program corresponding to "Ninja".  CMAKE_MAKE_PROGRAM is not set.  You probably need to select a different build tool.
CMake Error: CMAKE_CXX_COMPILER not set, after EnableLanguage
Building Linux application...                                           
Unable to generate build files

whoami commented on 2021-10-05 00:16 (UTC)

https://storage.googleapis.com/flutter_infra_release/releases/stable/linux/flutter_linux_2.5.2-stable.tar.xz

pagdot commented on 2021-09-02 14:21 (UTC)

I got permission errors when running flutter:

$ flutter                      
mkdir: cannot create directory '/opt/flutter/bin/cache': Permission denied

I "fixed" it by running sudo chmod a+rw -R /opt/flutter

cfujino commented on 2021-06-17 17:15 (UTC)

I opened a PR to update this: https://github.com/frealgagu/archlinux.flutter/pull/9

SafwanLjd commented on 2021-05-05 08:35 (UTC) (edited on 2021-05-05 08:40 (UTC) by SafwanLjd)

This package was flagged out of date on the 4th of May for not releasing the 2.0.6 update; however, the 2.0.6 Flutter release was a hotfix for a bug on macOS and it doesn't concern GNU/Linux.

Form Flutter's official Github page:

2.0.6 (April 16, 2021)

This is a hotfix release that addresses a single issue:

• Issue #81326 - macOS binaries not codesigned There are no code changes to this release, but binary artifacts for macOS were re-built and codesigned.

cfujino commented on 2021-04-30 18:03 (UTC)

.git is required by the CLI tool. The others aren't required, but if you mutate the checkout then the flutter upgrade command won't work.

masterberg commented on 2021-04-30 16:57 (UTC)

Are the .git/, .github/, .idea/ folders really required? They are massive (over 135MiB) and seems to have no use at all. Shouldn't the PKGBUILD leave those out of the install process?

masterberg commented on 2021-04-28 18:20 (UTC)

I had the same problem as hossamdash and following his solution fixed it.

astroanax commented on 2021-02-27 08:55 (UTC)

I had the same problem as hossamdash and following his solution fixed it.

JuniorJPDJ commented on 2021-01-14 01:29 (UTC)

flutter-dev is now orphaned, didn't you think about taking it?

hossamdash commented on 2021-01-12 11:50 (UTC) (edited on 2021-01-12 11:53 (UTC) by hossamdash)

so i have installed this package but was facing two issues: Although i had the dart package installed on my system -which this package depends on-, both installing this package for the first time and each flutter doctor -v command results in the redownload of the dark-sdk which is inside /opt/flutter/bin/cache disregarding both the existing dark-sdk in the cache and the standalone dart package installed on my system. to solve this i did two things, i uninstalled the standalone dart sdk and then added a line to the build files of this package right after the chmod -R g+w /opt/flutter line. this line is chmod g+s /opt/flutter makes any files created within the /opt/flutter path inherit the group flutterusers which stops flutter doctor from redownloading the dart-sdk.

francescortiz commented on 2020-12-31 10:06 (UTC)

I think that flutter is designed to be self-upgraded. Hence in the end I decided to clone flutter repo instead of using AUR.

midhun commented on 2020-12-31 03:22 (UTC)

Getting failed to commit transaction error.

Using the --overwrite /opt/flutter/packages/flutter_tools/.packages option solves the issue, but the question is, is it fine to overwrite?

bkb commented on 2020-12-30 13:31 (UTC) (edited on 2020-12-31 09:48 (UTC) by bkb)

same

resolved with


$ mv /opt/flutter/packages/flutter_tools/.packages /opt/flutter/packages/flutter_tools/.packages.old

But I experience a LOT of

warning: directory permissions differ on $
filesystem: 775  package: 755

I experienced basic packages missing on my projects (incorrect URI), idk if it's related but I was able to correct that with flutter pub/packages get and a lot of restart/reloads

francescortiz commented on 2020-12-27 22:54 (UTC)

I get the followeing:

error: failed to commit transaction (conflicting files) flutter: /opt/flutter/packages/flutter_tools/.packages exists in filesystem Errors occurred, no packages were upgraded.

frealgagu commented on 2020-12-05 22:36 (UTC)

I maintain the latest built package at:

https://github.com/frealgagu/archlinux.flutter/releases/

midhun commented on 2020-10-16 07:32 (UTC) (edited on 2020-12-28 08:20 (UTC) by midhun)

(solved) I cannot get to update flutter. having conflict error. Is it because I did >flutter upgrade ?

error: failed to commit transaction (conflicting files) flutter: /opt/flutter/.github/ISSUE_TEMPLATE/1_activation.md exists in filesystem flutter: /opt/flutter/.github/ISSUE_TEMPLATE/2_bug.md exists in filesystem flutter: /opt/flutter/.github/ISSUE_TEMPLATE/3_feature_request.md exists in filesystem flutter: /opt/flutter/.github/ISSUE_TEMPLATE/4_performance_others.md exists in filesystem flutter: /opt/flutter/.github/ISSUE_TEMPLATE/5_performance_speed.md exists in filesystem flutter: /opt/flutter/.github/ISSUE_TEMPLATE/6_infrastructure.md exists in filesystem flutter: /opt/flutter/.github/ISSUE_TEMPLATE/config.yml exists in filesystem flutter: /opt/flutter/dev/benchmarks/complex_layout/ios/Flutter/Debug.xcconfig exists in filesystem flutter: /opt/flutter/dev/benchmarks/complex_layout/ios/Flutter/Release.xcconfig exists in filesystem flutter: /opt/flutter/dev/benchmarks/complex_layout/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings exists in filesystem ...

EDIT: OK just delete the directory and a clean install solves the issue.

bkb commented on 2020-09-04 09:47 (UTC) (edited on 2020-09-04 09:51 (UTC) by bkb)

yay -S flutter-group-pacman-hook
chgrp -R flutterusers /opt/flutter
chmod g+w /opt/flutter
sudo usermod -a -G flutterusers $USER

Is not enough to execute flutter as non-root, someone getted it to work here?

flutter 
        create $PROJECT
        doctor

Failed to open or create the artifact cache lockfile: "FileSystemException: Cannot open file, path = '/opt/flutter/bin/cache/lockfile' (OS Error: Permission denied, errno = 13)"
Please ensure you have permissions to create or open /opt/flutter/bin/cache/lockfile
Failed to open or create the lockfile

FirstAirBender commented on 2020-08-06 18:38 (UTC)

@solstice, you can use this pacman hook to achieve the same thing:

https://aur.archlinux.org/packages/flutter-group-pacman-hook/

solsticedhiver commented on 2020-07-15 11:34 (UTC)

You forgot to add a post_upgrade() in .install:

chgrp -R flutterusers /opt/flutter
chmod g+w /opt/flutter

Otherwise, an upgrade will cause problem

jhzn commented on 2020-07-07 21:44 (UTC)

If you're getting issues with installing dependencies like the following:

-> Could not find all required packages:
    lib32-libva (Wanted by: flutter -> lib32-libglvnd-git -> lib32-mesa-aco-git)
    lib32-libxext (Wanted by: flutter -> lib32-libglvnd-git)
    lib32-libxext (Wanted by: flutter -> lib32-libglvnd-git -> lib32-mesa-aco-git -> lib32-libdrm-git -> lib32-cairo-git)
...
...
...

I've made a PR to the maintainer with a fix here:

https://github.com/frealgagu/archlinux.flutter/pull/2

Kppqju77 commented on 2020-06-19 10:56 (UTC)

@btimofeev: flutter needs to be run as root, or you can use a hook like mine (flutter-group-pacman-hook) to declare a group having the permissions to use it (it defaults to fultterusers group as it is the example in the PKGBUILD)

btimofeev commented on 2020-06-16 14:05 (UTC)

flutter doctor ~/mkdir: cannot create directory '/opt/flutter/bin/cache': Permission denied

Kppqju77 commented on 2020-06-05 14:41 (UTC)

@hack.augusto my trick is flutter-group-pacman-hook package, but it will throw some warning when upgrading flutter. The package adds a pacman hook that will apply the "right" rights on /opt/flutter. You can define whatever group you want it applied to, but defaults to flutterusers.

cfujino commented on 2020-06-03 00:52 (UTC)

git and bash are required, and should be moved to regular dependencies (and unzip added). And I think dart should be removed altogether, as flutter vends its own (custom) version of the dart sdk.

frealgagu commented on 2020-05-24 19:12 (UTC)

@hack.augusto A package must not use local users in building, the app itself should use a local config for its usage, so it's not something that should be changed in the PKGBUILD. Other packages like npm, go or python are installed as root and to install specific adds, they need to be installed as root (or even be installed using other AUR package). Flutter is more recent that those other packages but I think that this is the way to install adds in the future.

hack.augusto commented on 2020-05-23 11:16 (UTC)

Thanks for the PKGBUILD!

I'm not found of the idea of running flutter as root, maybe the package could create the flutterusers group by default?

These are the lines I added to my local package:

chown -R :flutterusers "${pkgdir}/opt/${pkgname}"
chmod -R g+w  "${pkgdir}/opt/${pkgname}"

cfujino commented on 2020-05-22 22:45 (UTC)

Yes, we should add unzip as a dependency, it's listed as one of the system requirements https://flutter.dev/docs/get-started/install/linux

Kppqju77 commented on 2020-05-22 15:42 (UTC)

Looks like flutter is requiring unzip to download packages (It throwed me errors about this when automatically installing dart for example). I don't know if we should add it to the dependencies...

opt/flutter/bin/internal/update_dart_sdk.sh: ligne 93: unzip : command not found

eh8 commented on 2020-05-18 02:32 (UTC)

@Ionaowna, did you install all four Android SDK packages?

lonaowna commented on 2020-05-16 08:20 (UTC)

Hm, I've installed android-sdk, yet flutter doctor doesn't seem to like it:

Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel stable, v1.17.1, on Linux, locale en_US.utf8)
[✗] Android toolchain - develop for Android devices
    ✗ ANDROID_HOME = /opt/android-sdk
      but Android SDK not found at this location.

Kppqju77 commented on 2020-05-13 19:24 (UTC) (edited on 2020-05-13 19:31 (UTC) by Kppqju77)

1.17.0 looks straightforward to build, however i had to:

sudo pacman --overwrite /opt/flutter/\* -U flutter-1.17.0-1-x86_64.pkg.tar.xz

ahwelp commented on 2020-05-03 16:25 (UTC)

I needed to add the multilib repo so all the lib32 things would work. https://wiki.archlinux.org/index.php/Official_repositories#multilib

Daegalus commented on 2020-04-29 00:05 (UTC)

For those still having issues. Go to /var/tmp/pamac-build-[username]/ , delete the flutter folder and try again. Fixed it for me.

Neff commented on 2020-04-23 12:35 (UTC)

ERROR: One or more files did not pass the validity check! Failed to build flutter.

I have visited github flutter issue page,and i don't get what i have to do for install flutter via AUR.

Kppqju77 commented on 2020-04-19 13:53 (UTC)

Yup, 3f241c6237078338a0568d1e161f5d4b6d47ea3af377c9522d17223a9bb94c96 looks to be the good checksum now...

cfujino commented on 2020-04-18 08:45 (UTC) (edited on 2020-04-18 08:46 (UTC) by cfujino)

@kronaemmanuel I bet that's because of https://github.com/flutter/flutter/issues/55082. Because of an infra change I made, the stable package got regenerated today, and I wouldn't be surprised if the checksum of the archive changed.

kronaemmanuel commented on 2020-04-18 06:47 (UTC)

I'm getting this error. Any ideas on what I can try?

==> Validating source files with sha256sums...
    flutter-1.12.13+hotfix.9.tar.xz ... FAILED
    flutter.sh ... Passed
    flutter.csh ... Passed

enshuo commented on 2020-04-07 16:20 (UTC)

sudo setfacl -m u:YOURUSERNAME:rwx -R /opt/flutter/ can also solve some permission issues before the flutter fix https://github.com/flutter/flutter/issues/44526.

Ucak commented on 2020-03-30 10:51 (UTC)

Writing here for if anyone faces the same issue, in my case everything worked except for the hotreload feature, so i had to do flutter version 1.16.3. Otherwise hotreload and hotrestart buttons were gray.

cfujino commented on 2020-02-20 02:39 (UTC)

@TheAifam5 unfortunately, at this time, maintaining the .git directory is required for the flutter sdk to work. For example, running flutter doctor uses git to check the version. There is an outstanding github issue to fix this, to better support installation from package managers: https://github.com/flutter/flutter/issues/44526.

If you are REALLY concerned about the disk space, you can make your git repo a shallow clone, via:

git pull --depth 1
git gc --prune=all

That for me got my .git directory from 157mb to 95mb ¯_(ツ)_/

xuanwo commented on 2020-02-14 23:42 (UTC)

Why lib32-libglvnd is required?

theaifam5 commented on 2020-01-24 20:51 (UTC)

@rockypra Thank you for the clarification. I wonder if that is needed, even the package sticks to the specific version, and AUR provides also other versions like beta and dev.

rockypra commented on 2020-01-01 10:39 (UTC)

Flutter SDK works that way, unfortunately. They use git for version management even for the user local snapshot. If you're managing Flutter SDK on your own, you can change which channel of release you want to follow with flutter channel Channel switching is basically fetching from their github repo, doing the branch switching, and updates the local snapshot. That's why when you try to change the channel or doing an upgrade you can see a lot of git related process like pulling from the git repository and/or branch switching.

theaifam5 commented on 2019-12-26 18:47 (UTC)

No way that this package contains .git.... just WHYYYY... is SO BLOATED

ardeaf commented on 2019-10-29 09:52 (UTC) (edited on 2019-10-29 10:40 (UTC) by ardeaf)

didn't have time to dig in to why this might be a bad idea so someone feel free to correct me, but after upgrading I needed to chown the entire /opt/flutter/bin/cache folder to get going again, since it was all owned by the root:root group.

edit: cache updates frequently so this is just an (Extremely) temporary solution.

mattyclarkson commented on 2019-09-22 21:45 (UTC)

I've been working on this package to remove the permission errors. I've put up the changes at https://github.com/mattyclarkson/aur-flutter. See the commit message for the various improvements.

Mainly, it allows the package to work without any permission errors and a vastly reduced package and install size.

jaap commented on 2019-06-26 16:45 (UTC)

if updating this package after manually upgrading flutter it fails because the files already exist.

Quatro commented on 2019-03-01 16:18 (UTC)

warning: directory permissions differ on /opt/flutter/
filesystem: 775  package: 755

This happens for any installation, upgrading.

expwez commented on 2018-12-03 19:18 (UTC)

please add flutter binary to path

apaatsio commented on 2018-06-18 07:29 (UTC)

This fixed the permission issues for me:

sudo chmod a+rw /opt/flutter/bin/cache/lockfile /opt/flutter/version

d-sha commented on 2018-05-26 11:58 (UTC)

Those issues are all permission issues, as all files in the package are owned by root. You can check this in the flutter logs.

frealgagu commented on 2018-04-26 00:31 (UTC)

@d-sha How do you fix it manually? @g4rrucho this package is under heavy development and it's still in beta phase. If anyone have ideas of how to fix the issues and how could I improve this package please let me know

d-sha commented on 2018-04-24 22:29 (UTC)

Hi, When installed flutter crashes with permission errors: /opt/flutter/bin/cache/lockfile' (OS Error: Permission denied, errno = 13) /opt/flutter/version' (OS Error: Permission denied, errno = 13)

I fixed this locally but i dont know what the best way to fix the package. Thanks.

g4rrucho commented on 2018-04-21 15:01 (UTC)

Flutter constantly crashes. Anyone has any idea how to fix it?

alf commented on 2018-03-08 14:41 (UTC) (edited on 2018-03-08 14:47 (UTC) by alf)

here is my PKGBUILD for flutter. it will install in /opt/flutter, add ENVIRONMENT VARIABLES in /etc/profile.d and just use "flutter upgrade" to upgrade

https://gist.github.com/alfinbi/502bd912f34a23f23bae1b8661308f78

thepasto commented on 2017-11-01 14:42 (UTC)

If someone is interested here's a PKGBUILD to install in /opt https://pastebin.com/TeGLc0s6

flipflop97 commented on 2017-07-15 12:12 (UTC)

Ok I give up already. Flutter is a hell in getting to work with arch packages since it does everything by itself. I'm disowning the package so if anyone is interested in trying to create a decent package, feel free to do so.

flipflop97 commented on 2017-07-11 18:01 (UTC)

Yes, I know the installation method isn't optimal. I'll try to fix it in the coming weeks, but the way flutter works makes this more difficult (flutter tries to do everything by itself, like updating and downloading dependencies).

jenrik commented on 2017-07-01 09:00 (UTC)

This completely bypasses the package manager. A package should contain the program files not just another script that download the program to the user home directory. I would expect to be able to rollback the package version by installing a older package I had build.

tinxy commented on 2017-06-17 08:48 (UTC)

Hey flipflop97, is there a reason why every user needs their own copy of flutter? Also, there is no option to update the local copy using your script. Also, would it not be helpful to add dart (and possibly others) as dependency and intellij-idea-community-edition as optdep? I would suggest using the releases and installing them in /opt or so https://github.com/flutter/flutter/releases