Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to resolve flutter doctor issues with home brew?

I am using OS X High Sierra. I started with the install documentation here: https://flutter.io/setup-macos/ however I cannot seem to install libimobiledevice and ideviceinstaller.

When I start flutter doctor I get the following:

✗ libimobiledevice and ideviceinstaller are not installed. To install, run:
        brew install --HEAD libimobiledevice
        brew install ideviceinstaller

So I do as requested:

brew install --HEAD libimobiledevice
Error: libimobiledevice 1.2.0_2 is already installed
To install HEAD_2, first run `brew unlink libimobiledevice`


brew install ideviceinstaller
Warning: ideviceinstaller 1.1.0_4 is already installed

After that if I call the doctor again, the same error as above is displayed. How can I fix this?

like image 712
hot33331 Avatar asked Mar 07 '23 16:03

hot33331


2 Answers

In MacOS After many hours I solved it by following all these steps:

1- Go to https://brew.sh website and copy& run "Install Homebrew" command in terminal as below:

/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" 

then run all these commands in terminal:

2- brew install wget

3- uninstall ideviceinstaller : brew uninstall ideviceinstaller -g

4-uninstall libimobiledevice : brew uninstall libimobiledevice -g

5-install libimobiledevice with --HEAD : brew install --HEAD libimobiledevice -g

6-install ideviceinstaller : brew install ideviceinstaller -g

7- sudo rm -rf /var/db/lockdown/*

8- Then run ./flutter doctor and it's solved for me :)

like image 159
Hamed Jaliliani Avatar answered Mar 09 '23 18:03

Hamed Jaliliani


Easiest way to install flutter with brew

tap fabsb/flutter repository

brew tap fabsb/flutter

Then install flutter:

brew cask install flutter

Finally validate your installation:

flutter doctor

To remove flutter and this tap:

brew cask uninstall flutter
brew untap fabsb/flutter

source:

https://github.com/fabsb/homebrew-flutter

like image 36
kavehmb Avatar answered Mar 09 '23 19:03

kavehmb