I am new to Linux / Ubuntu and want to install the flutter sdk and their docs recommend
Create a folder where you can install Flutter. Consider creating a directory at
~/development/
.Extract the file into the directory you want to store the Flutter SDK.
tar -xf ~/Downloads/flutter_linux_3.x.tar.xz -C ~/development/
When finished, the Flutter SDK should be in the ~/development/flutter directory.
But placing around 14000 files with a total size of 1.7 GB below my home ~/
directory seems wrong to me. Under Where to install libraries manually? or Where to store Android SDK files two options are recommended:
- use
/usr/local/lib/
as FHS recommends - use
/opt/
and links to Linux-Filesystem-Hierarchy / opt
So I tried
$ sudo mkdir -p /usr/local/lib/flutter-sdk
$ tar -xf ~/Downloads/flutter_linux_3.24.3-stable.tar.xz -C /usr/local/lib/flutter-sdk/
But I got hundreds of messages similar to
tar: flutter/docs/platforms/Hybrid-Composition.md: open failed: File or Folder not found
tar: flutter/docs: function mkdir failed: File or Folder not found
Trying sudo tar -xf ...
failed.
Questions
- How can I extract the files into the destination folder
/usr/local/lib/flutter-sdk/
? - Do I have to make changes of certain rights (read write access) for a normal / non-root user after the folders and files have been extracted?