How to install flutter on Linux Mint - linux

I'm new to linux mint and I don't know how to install flutter.
"https://docs.flutter.dev/get-started/install/linux"
I couldn't understand the things in the link here, I would appreciate it if you could help.

Let me explain in simple steps :
first install "snapd" in your linux machine using command
Steps to install snapd-
sudo mv /etc/apt/preferences.d/nosnap.pref ~/Documents/nosnap.backup
sudo apt update
sudo apt install snapd
Now,Install flutter using snap-
1- sudo snap install flutter --classic
flutter will get installed after this (stablle internet connection needed)
To verify your flutter, run following command
flutter doctor
Note: You will need to install Android studio to run flutter on android emulator.
Hope it will work!!

#Install Flutter manually
Download the following installation bundle to get the latest stable release of the Flutter SDK From :
enter link description here
Extract the File > Move to the desire location .
then , Just Update The Path Parmanently .Shown in the Snaps Bellow :

Related

Flutter Doctor shows problem with GTK 3.0 for CentOS Linux 7 running on Doctor

Goal: Compile and run flutter examples emulating Linux Desktop on CentOS 7 docker container
(Note: Can't use snapd - not supported within Docker) Installed manually
Managed to get everything else cleared up but this one:
GTK 3.0 development libraries are required for Linux development.
They are likely available from your distribution (e.g.: apt install
libgtk-3-dev)
The others show OK:
Γú[Γ£ù] Linux toolchain - develop for Linux desktop
ΓÇó clang version 3.4.2 (tags/RELEASE_34/dot2-final)
ΓÇó cmake3 version 3.17.5
ΓÇó ninja version 1.10.2
ΓÇó pkg-config version 0.29.2
Γú[Γ£ô] Connected device (1 available)
ΓÇó Linux (desktop) ΓÇó linux ΓÇó linux-x64 ΓÇó CentOS Linux 7 (Core)
4.19.76-linuxkit
Another thread had asked for specific versions when diagnosing this. Here they are:
pkg-config --modversion gtk+-3.0
3.22.30
pkg-config --modversion glib-2.0
2.56.1
pkg-config --modversion gio-2.0
2.56.1
pkg-config --modversion blkid
2.23.0
PKG_CONFIG_PATH=/usr/local/lib/pkgconfig:/usr/lib64/pkgconfig:/usr/local/lib/pkg
config:
Would LOVE some help getting this resolved!!!!
I updated my Ubuntu to version 22.04 LTS, and when I needed to install Flutter and Android Studio I ran into a similar error in flutter doctor output:
GTK 3.0 development libraries are required for Linux development.
They are likely available from your distribution (e.g.: apt install libgtk-3-dev)
Command apt install libgtk-3-dev returned various errors, at first something like:
libgtk-3-dev is already the newest version
And then i tried to update all packages:
sudo apt-get update
sudo apt-get autoremove
dpkg --get-selections | grep hold
None of these commands didn't do anything...
So, i try to remove libgtk-3-dev, and after that repeat autoremove and try to install libgtk-3-dev again. But now it showed me that it has some unmet dependency (it looks like it depended on some version of libpcre3 and\or libpcre3-dev) and for some reason apt refused to install it.
I tried so many ways to remove this damn package, but I could not do it. As far as I understand, initially the problem is that the version of this shitty package (libpcre3) that I have has been stretching since Ubuntu 18, and there is both a 32-bit version and x64, and dependencies are crooked in some of them ... Well, or some other problem - maybe something was not deleted during the next update, although it should have been.
In the end, I managed to solve the problem using a graphical shell over apt - synaptic (its great stuff, I recommend it to everyone). It's very easy to set up:
sudo apt install synaptic
After that, I found the amd64 version libpcre3 in list, marked it for installation and installed it. After that, just install through the console
sudo apt install libgtk-3-dev
It worked fine, updating all dependencies.
P.S. First thing I want to note is that Flutter is incredibly crooked shit (only my opinion). If you haven’t started developing on it yet, don’t start, choose something more stable. If it will be possible to use this garbage, then only in five years at best...
And secondly, I spent a lot of time searching and solving the problem with the library, which is essentially perl dependencies. Despite the fact that I myself do not use perl at all. Looks like the notorious "Dependency Hell" is already here.
It appears most of this has to do with pathing, some of the libs have slightly different names (gtk3-devel, libblkid-devel, xz-devel). Some irritations around cmake3, and getting more current versions of pkg-config, xproto, kbproto, xextproto, and the configuration of said packages. At least now I have a clean flutter doctor.
Now, on to trying to run it...
I recently reinstalled the OS on my machine, I decided to install and use flutter through FVM. I had many other problems.
[✓] Flutter (Channel stable, 3.0.5, on Ubuntu 20.04.3 LTS 5.15.0-41-generic, locale en_US.UTF-8)
[!] Android toolchain - develop for Android devices (Android SDK version 33.0.0)
! Some Android licenses not accepted. To resolve this, run: flutter doctor --android-licenses
[✓] Chrome - develop for the web
[✗] Linux toolchain - develop for Linux desktop
✗ clang++ is required for Linux development.
It is likely available from your distribution (e.g.: apt install clang), or can be downloaded from https://releases.llvm.org/
✗ CMake is required for Linux development.
It is likely available from your distribution (e.g.: apt install cmake), or can be downloaded from https://cmake.org/download/
✗ ninja is required for Linux development.
It is likely available from your distribution (e.g.: apt install ninja-build), or can be downloaded from https://github.com/ninja-build/ninja/releases
✗ GTK 3.0 development libraries are required for Linux development.
They are likely available from your distribution (e.g.: apt install libgtk-3-dev)
[✓] Android Studio (version 2021.2)
[✓] VS Code
[✓] Connected device (2 available)
[✓] HTTP Host Availability
Solutions:
clang++
sudo apt-get -y install clang
CMake
I was trying sudo snap install cmake, But it returned an error, this is because the snap review "cmake" was published using classic confinement and therefore can make arbitrary system changes outside the security sandbox that snaps are usually confined to, which can put the system at risk.
It was suggested to me: "If you understand and want to continue, repeat the command including --classic?
To solve it, I just understood and continued
sudo snap install cmake --classic
GTK 3.0 development libraries
sudo apt install libgtk-3-dev
This solved everything here, it doesn't have an execution order, each dependency is added independently.
I hope I contributed!

Failure to install Jupyter Notebook on MacBook Pro (MacOS) "Failed to build argon2-cffi" [duplicate]

I updated to the latest OS, and/or restarted my computer (this happens on every major update, but this time all I did was restart my computer on 2022-09-13)
This morning I navigated to my work's codebase in the Command Line on my MacBook pro, typed in "git status" in the repository and received an error:
(IN 9/2022, this error was much different, but I didn't capture it)
xcrun: error: invalid active developer path (/Library/Developer/CommandLineTools), missing xcrun at: /Library/Developer/CommandLineTools/usr/bin/xcrun
git will not work!
How do I fix git, and command line tools?
The problem is that Xcode Command-line Tools needs to be updated.
** UPDATED for Ventura and updated apple dev download page **
After opening the terminal after a restart, I tried to go to my code, and do a git status, and I got an error and prompt for command line software agreement.
So press space until you get to the [agree, print, cancel] option, so careful hit space to scroll down to the end, if you blow past It you have to run a command to get it back. Use sudo xcodebuild -license to get to it again.
Just be careful on scrolling down and enter agree and press return and it will launch into an update.
Then I tried to use git after the install, and it prompted me to install Xcode tools again.
I followed my own advice from previous years (see below), and went to https://developer.apple.com/download/all/?q=Command%20Line%20Tools and downloaded
"Command Line Tools for Xcode 14" (You have to log in with your Apple ID, so have that login readily available.
You have to either download the tools from CLI or the developer page and before you can use git, you need to reboot!!! SUPER IMPORTANT, you can get stuck in a loop of downloading
Rebooting will break the loop and complete the installation of your CLI tools including git so that you can get back to work
Solutions for previous years, these may or may not be valid these days as the downloads page has changed significantly:
PREVIOUS YEARS SOLUTIONS, probably #2 is most helpful.
** Solution #1 **
Go back to your terminal and enter:
xcode-select --install
You'll then receive the following output:
xcode-select: note: install requested for command line developer tools
You will then be prompted in a window to update Xcode Command Line tools. (which may take a while)
Open a new terminal window and your development tools should be returned.
Addition: With any major or semi-major update you'll need to update the command line tools in order to get them functioning properly again. Check Xcode with any update. This goes beyond Mojave...
After that restart your terminal
Alternatively, IF that fails, and it very well might.... you'll get a pop-up box saying "Software not found on server", see below!
Solution #2
and you hit xcode-select --install and it doesn't find the software, log into Apple Developer, and install it via webpage.
Log in or sign up here:
https://developer.apple.com/download/more/
Look for: "Command Line Tools for Xcode 14.x" in the list of downloads
Then click the dmg and download.
I got some errors that the software was unavailable from the update server when trying
xcode-select --install
What fixed it for me was going here https://developer.apple.com/download/more/ and downloading Command Line Tools (macOS 10.14) for Xcode 10 and then installing it manually.
After that, the errors should be gone when you open up a new terminal.
Update for macOS Ventura 13.0.1 (Nov 2022)
Install Command Line Tools for Xcode 14.1
For me xcode-select --reset was the solution on Mojave.
In addition to dustbuster's answer I needed to set path to the Xcode folder with this command:
sudo xcode-select -switch /Library/Developer/CommandLineTools
updated from Mojave to Big Sur and got the same error :
the command
xcode-select --install
worked like a charm
After upgrade to Mac Catalina I faced the same issue, I had to run couple of commands to get this fixed.
First started with:
xcode-select --install
It didn't fix the problem, had to run the following in sudo
sudo xcode-select --reset
Then, finally got fixed after I switched and set the path explicitly for active developer directory:
sudo xcode-select -s /Library/Developer/CommandLineTools
Note: In case you have Xcode installed, you may need to specify Xcode directory in this case, it should be something like this
xcode-select -s /Applications/Xcode.app
For me what worked is the following:
sudo xcode-select --reset
Then like in #High6's answer:
sudo xcodebuild -license
This will reveal a license which I assume is some Xcode license. Scroll to the bottom using space (or the mouse) then tap agree.
This is what worked for me on MacOS Mojave v 10.14.
I've used xcode-select --install given in the accepted answer in previous major releases.
I've just upgraded to OS X 10.15 Catalina and run the Software Update tool from preferences again after the OS upgrade completed. The Xcode utilities update was available there, which also sorted the issue using git which had just output
xcrun: error: invalid active developer path (/Library/Developer/CommandLineTools)
If you use xcode then install it (~12GB)
xcode-select --install
Otherwise install latest command line tools (~500MB)
Update: If struck in install loop
xcodebuild -runFirstLaunch
if there are several versions, select one of them from:
xcode -> Preferences and tap Locations then select, as the followng image
I figured out the Xcode Command Line Tools part from the error message, but after running Xcode and getting the prompt to install the additional tools it did claim to install them, but still I got the same error after opening a new terminal.
So I did the xcode-select --install manually and after that it worked for me.
Mac OS : Big Sur
First Priority
sudo xcode-select --reset
sudo xcodebuild -license
Second Priority
xcode-select --install
Following worked on M1
ProductName: macOS
ProductVersion: 11.2.1
BuildVersion: 20D74
% xcode-select --install
Agree the Terms and Conditions prompt, it will return following message on success.
% xcode-select: note: install requested for command line developer tools
If you have Xcode downloaded manually (i.e. not from the App Store) or don't have Xcode at all:
sudo rm -rf /Library/Developer/CommandLineTools
Go to https://developer.apple.com/download/more/ to download Command Line Tools (macOS 10.14) for Xcode 10
Setup Command Line Tools
If you have Xcode installed from the App Store:
xcode-select --install
Open Terminal:
install XCode developer tools and fix the problem.
$ xcode-select --install
Reset the path to Xcode if you have several versions:
$ xcode-select --switch /Applications/Xcode.app
$ xcode-select --switch /Library/Developer/CommandLineTools
Run this command:
xcode-select --install
Hit return for a progress indicator on the Command Line Tools download.
After installation of the Command Line Tools has been completed, your Mac should be rebooted. If you’re getting “xcrun error invalid active developer path” while working in Terminal, refresh the application or relaunch it.
Even after following the above-mentioned steps, if you see the error: invalid active developer path (/Library/Developer/CommandLineTools). The next step would be to try and install Command Line Tools using a DMG file that can be downloaded directly from the Apple website.
Again, if you are using Homebrew, you need to update it. You don’t need to uninstall and again install Homebrew on Mac.
NOTE: If you are using Homebrew, try updating it after re-installing Command Line tools.
Credits: Git not working after macOS Update
This just happened to me after upgrading my Macbook pro to macOS Ventura. After the upgrade, the git command line stopped working with showing up this message.
xcrun: error: invalid active developer path
(/Library/Developer/CommandLineTools), missing xcrun at:
/Library/Developer/CommandLineTools/usr/bin/xcrun
Running brew upgrade fixed git command line.
As of September 13, 2022, I had a similar issue after upgrading my MBP M1 to Monterey 12.6, and although I followed some of the answers, my Mac kept prompting me with a dialogue to install git as a developer tool. Every time that the installation was completed, I was prompted to the same dialogue.
Finally, I had to do a combination of all the answers to make it work:
First remove the command line tool:
sudo rm -rf /Library/Developer/CommandLineTools
Reinstall the xcode-select:
xcode-select --install
The above will prompt you with a dialogue to confirm the installation.
Set path to the Xcode folder with following:
sudo xcode-select -switch /Library/Developer/CommandLineTools
I observed in the Catalina privacy setting if Xcode not added in Full access disk I will get the same error, Xcode does not run scripts. Add your Xcode the same as in the attached image. After that clean build and run. Hope so it will work.
For me, I didn't have xcode installed (on Mojave OS). I went to the App Store on my mac and downloaded it, then went back to terminal and typed git and hit enter, then it worked.
I found that my version of Xcode was too outdated and installing command-line-tools wasn't helping. Here's what I did:
I completely uninstalled the outdated XCode
I reinstalled the most recent XCode from the app store
That was all. Git was restored.
This works for me
sudo xcode-select --reset
sudo xcodebuild -license
X-code must be installed.
For me, for the macos Ventura 13.0 user installing this software helped
I wasn't able to run any xcode install commands, git was not working at all.
You can find this package here
https://developer.apple.com/download/all/
For those using Catalina and Xcode-beta:
sudo xcode-select -s /Applications/Xcode-beta.app/Contents/Developer
I updated my macOS yesterday,from macOS Mojave(10.14.6)to macOS Catalina(10.15.7),I was executing "git" command in my project. I get same errors。
run:
xcode-select --install
After Updating macOS to Monterey (12.3) from BigSur getting such issue
only worked-
xcode-select --install
Done!
With previous app development experience, may I say with confidence that the git version delivered with apple always create problems. So the sooner you get rid of apple git the better, so may I suggest:
brew uninstall git
brew update
brew install git
# which git
/usr/local/bin/git
For me It happened after Mac OS update to Mojave and git was not functioning in Intellij
Solution:-
Go to Settings, then File | Settings | Version Control | Git and edit Path to Git executable field which is /usr/local/bin/git
I had the same issue and couldn't use SVN after the update,
Just in case if doing xcode-select --install didn't fix the issue,
You might see,
svn: error: The subversion command line tools are no longer provided by Xcode.
Refer : https://developer.apple.com/documentation/macos_release_notes/macos_catalina_10_15_release_notes
Try installing the svn by brew
brew install svn
This should get you going.
For Ventura 13.1
I updated from macOS BigSur to Ventura 13.1 (Jan 2023). I only installed Xcode on the apple store and it worked for me.

Android-studio doesn't launch

I've been following these instructions to install Android-studio.
With exception I used
sudo snap install android-studio --classic
instead of
sudo snap install android-studio
And now when I try to launch it
android-studio
I get the next message
/var not root-owned 1000:1000
What should I do? Did I messed something up? What can I do to launch it?
P.S. Trying to launch it from Ubuntu Software does nothing.

How to install Visual Studio Code on Linux?

I have just downloaded VSCode-linux-x64 from the Microsoft website. It's a zip file called VSCode-linux-x64.zip. How can I install it on my Linux system?
From a few pages deeper into the setup docs in the link you offered...
Linux
Download Visual Studio Code for Linux
Make a new folder and extract VSCode-linux-x64.zip inside that folder
Double click on Code to run Visual Studio Code
Tip: If you want to run VSCode from the terminal, create the following
link substituting /path/to/vscode/Code with the absolute path to the
Code executable
sudo ln -s /path/to/vscode/Code /usr/local/bin/code in any folder to start editing files in that
folder.
Now, you can simply type code . in any folder to start editing files
in that folder.
I found the answer to my question and posting the answer so it can help others.
To download and install Visual Studio Code on Ubuntu . follow the steps below
Download Visual Studio Code for Linux
Extract the zip file VSCode-linux-x64.zip
Go inside the folder VSCode-linux-x64
double click and Run code executable to open Visual Studio Code .
You can right click on Visual Studio Code on toolbar (or launcher)
and select Lock to Launcher. this way you can launch the editor by
clicking it on launcher.
If you are using terminal follow the terminal commands
mkdir your_folder_name && cd your_folder_name unzip
../Downloads/VSCode-linux-x64.zip
./Code
This video will help you to download and install and use Visual Studio Code on Ubuntu if you still have some doubts
After 18.04 version, the following one-line terminal code works well.
sudo snap install code --classic
Installing with apt-get:
Step 1 – Enable Package Repository
Run the following command to enable Visual studio code repository to your system:
echo "deb [arch=amd64] http://packages.microsoft.com/repos/vscode stable main" | sudo \ tee /etc/apt/sources.list.d/vs-code.list
Step 2 – Install Visual Studio Code Editor
Now, Import the package signing gpg key on your system using the following command:
curl https://packages.microsoft.com/keys/microsoft.asc | gpg --dearmor > microsoft.gpg
sudo mv microsoft.gpg /etc/apt/trusted.gpg.d/microsoft.gpg
Install Visual Studio Code on your Debian based system (like Ubuntu):
sudo apt-get update
sudo apt-get install code
Step 3 – Launch Visual Studio Code and enable its extensions:
Now You can launch the Visual Studio Code editor on your system using the graphical menu.
There are a large number of extensions available for Visual Studio Code like PHP, Python, JavaScript etc. Install the required extensions to enhance your working experience with Visual Studio Code.
Source: https://tecadmin.net/install-visual-studio-code-editor-ubuntu/
Simplest way to install Visual Studio Code in Linux
I hope it useful.
Installing Visual Studio Code in Kali Linux - 4 simple steps
Update your system and install the below package.
sudo apt update
sudo apt install curl gpg software-properties-common apt-transport-https
Importing Microsoft GPG key to Kali Linux
curl -sSL https://packages.microsoft.com/keys/microsoft.asc | sudo apt-key add -
Adding APT repository for VS Code to Kali Linux
echo "deb [arch=amd64] https://packages.microsoft.com/repos/vscode stable main" | sudo tee /etc/apt/sources.list.d/vscode.list
Installing VS Code
sudo apt update
sudo apt install code
For reference:
https://youtu.be/ycIjQf0rOJI

QT version is not properly installed, please run make install

I installed QT-creator from a downloaded copy of qt-creator-linux-x86-opensource-2.6.1.bin using
sudo ./qt-creator-linux-x86-opensource-2.6.1.bin
in Ubuntu 11.04
I tried to add QT versions in QT-Creator/Build/QT-versions configuration and it asked for a qmake executable.
I installed it using:
sudo apt-get install qt4-devel
which deployed qmake in /usr/bin/qmake
I selected it in QT-Creator/Build/QT-versions configuration as manual, Qt-4.7.2 (System) /usr/bin/qmake-qt4 but QT version is not properly installed, please run make install message appears and I can't use it in QT-Creator/Build/Kits configuration.
How can I solve the problem and configure qmake for Qt-creator use in project creation?
This solved the problem for me on recent Ubuntu version:
sudo apt-get install qt5-default
Just so this no longer shows up as unanswered:
To install all qt-devel libraries, use
sudo apt-get install qt4-dev-tools libqt4-dev libqt4-core libqt4-gui
In Linux Mint 18.3 (32 bit) it also solved the problem:
sudo apt-get install qt5-default
So that Qt5 (5.5.1) was installed ready-to-use as a kit in QtCreator.
Although to install the Qt 5.9.0 version I had to explicitly download the package from https://download.qt.io/official_releases/qt/5.9/5.9.0/single/ (2 Gb unpacked) .
Then I had to run this command in terminal:
cd /home/username/Downloads/qt-everywhere-opensource-src-5.9.0
Then this command:
./configure
Then this
make
I was having this problem even after sudo apt-get install qt5-default (it was already installed).
However the version of QMake I had pointed to was in the Linux Processor SDK (02.00.02.11)
I fixed it by sourcing the environment setup before running qtcreator. The following shell script did it for me:
source /opt/ti/processor-sdk-linux-am335x-evm-02.00.02.11/linux-devkit/environment-setup
# substitute the location where the SDK is installed.
~/Qt5.9.0/Tools/QtCreator/bin/qtcreator -block
# substitute the location where QTCreator is installed

Resources