First: I have used Google to search for "flutter doctor" and searched your
site as well. I will detail my results below, but before that here is where I am:
1) I followed the directions at https://flutter.io/setup-windows/ up to the point where I am unable to proceed.
2) My environment is:
Windows 10, 64 bit, 210 Gb free space
Intel(R) Core(TM) i5-2320 CPU # 3.00GHz; 8.00 GB installed memory(RAM)
I have PowerShell 5.1,
I have setup Git for Windows with "Use Git from
the Windows Command Prompt" option
I am able to run git from the command prompt or power shell
3) I tried downloading the .zip of the beta but when I ran the
"flutter doctor" command it just hung.
4) Now for the search results:
I found 3 relevant questions:
a) "Getting Flutter doctor to work" - I tried cloning the "alpha" version
and checked the "Background Intelligent Transfer Service was running" (it
was).
b) "Running Flutter Doctor without any results" - I removed the alpha version
and cloned the beta version using git bash with the following results:
rex#NEXIUM MINGW64 /c/flutter
$ git clone -b beta https://github.com/flutter/flutter.git
Cloning into 'flutter'...
remote: Counting objects: 122267, done.
remote: Compressing objects: 100% (5/5), done.
remote: Total 122267 (delta 0), reused 0 (delta 0), pack-reused 122262
Receiving objects: 100% (122267/122267), 37.56 MiB | 2.39 MiB/s, done.
Resolving deltas: 100% (91730/91730), done.
Checking out files: 100% (2473/2473), done.
This also did not work (i.e. flutter doctor still hangs)
c) "Flutter doctor is not running in command prompt" - this one had the most
promising result:
I deleted the cache folder under the ..\AppData\Roaming\Pub directory.
when I ran "flutter doctor" this time I got the following results:
C:\Users\rex>flutter doctor
Checking Dart SDK version...
Downloading Dart SDK from Flutter engine 09d05a38912a3c1a906e95099cac9a7e14fae85f...
Unzipping Dart SDK...
// here there was some text above the ========== in the console about bits...
// which went away, window appeared compressed and then the following message:
Updating flutter tool...
// HANGS HERE
I am hoping to get the flutter tool installed and experiment with it for developing android and/or iOS apps. I have done some development using Xamarin in the Visual Studio 2017 but there is limited support for controls and I am
hoping that this tool will be more productive. IF there is anyone who can help me get past this problem I would appreciate any help. Thanks,
Rex
NEW INFORMATION BELOW:
I tried running the flutter doctor command in a command window with adminstrator privilege with the same result. It then tried editing the flutter.bat file with some echo commands to try to get additional information which showed me that the batch file was getting to the point where the following statement is executed:
>CALL "%dart%" %FLUTTER_TOOL_ARGS% "%snapshot_path%" %*
I edited the batch file to uncomment the lines assigning the FLUTTER_TOOL_ARGS which gave me additional information and the batch file exited as follows:
================== results in the command window =====================
>C:\Windows\System32>flutter doctor
>in acquire_lock ... # ECHO to get debug information
>in subroutine ... # ECHO to get debug information
>in after_subroutine ...# ECHO to get debug information
>dart - C:\src\flutter\flutter\bin\cache\dart-sdk\bin\dart.exe # ECHO dart
>FLUTTER_TOOL_ARGS ""--checked " --observe=65432" # ECHO FLUTTER_TOOL_ARGS
#next line is ECHO of snapshot_path
>snapshot_path C:\src\flutter\flutter\bin\cache\flutter_tools.snapshot
============== the following was output from the batch file =========
Unhandled exception:
Could not load "file:///C:/Windows/System32/%20--observe=65432":
FileSystemException: Cannot open file, path =
'C:\Windows\System32\ -->observe=65432'
(OS Error: The system cannot find the file specified. , errno = >2) null
# another ECHO
after CALL ... # echo to get debug information
================== end of results in the command window =====================
=========== ANOTHER NEW EDIT =============
Just to clarify the above edit, I totally deleted everything related to flutter and then re-installed/unzipped it in another directory "C:\src\flutter" which does not require admin privilege to edit, etc. but I did not delete the cache folder under the ..\AppData\Roaming\Pub directory as before so I am going back to do that this morning. I will also use the -v or -verbose option at the command prompt to see if there is any additional help and add the new information once done.
============== FOLLOW UP EDIT ================
I remove some of the debug ECHO statements, modified others, made sure 7z.exe is in the path, removed the cache directory but the results are basically the same as follows:
C:\WINDOWS\system32>flutter doctor -verbose
Show dart, FLUTTER_TOOL_ARGS, and snapshot_path:
dart - C:\src\flutter\flutter\bin\cache\dart-sdk\bin\dart.exe
FLUTTER_TOOL_ARGS ""--checked " --observe=65432"
snapshot_path C:\src\flutter\flutter\bin\cache\flutter_tools.snapshot
execute call to dart ...
Unhandled exception:
Could not load "file:///C:/Windows/System32/%20--observe=65432":
FileSystemException: Cannot open file, path =
'C:\Windows\System32\ --observe=65432' (OS Error: The system cannot find
the file specified., errno = 2)
null
returned from call to dart
exit code 255
C:\Windows\System32>
============ Another Update ===========
I decided to try the clone of the beta again since that was the most promising of all the previous things I did. When done I used the power shell and issued the "flutter channel" command just to see what that would do. Surprisingly I got a similar result to running "flutter doctor" previously. First there was an output at the top of the screen showing dart being downloaded and then when that was done the following was printed on the console below the original command:
C:\Users\rex>flutter channel
Checking Dart SDK version...
Downloading Dart SDK from Flutter engine
1ed25ca7b7e3e3e8047df050bba4174074c9b336...
Unzipping Dart SDK...
Updating flutter tool...
and then the console hung as before...
I finally aborted the command and set echo on in flutter.bat. That file hangs with the following command displayed on the screen (all on the same line):
C:\src\flutter>CALL "C:\src\flutter\bin\cache\dart-sdk\bin\dart.exe"
"--checked --observe=65432"
"C:\src\flutter\bin\cache\flutter_tools.snapshot" doctor
At this point I am pretty much at a loss.
Have tried the following?
Run the flutter doctor command from a command prompt with admin privileges?
Tried installing a different type of unzip program (like 7-zip) and ensuring it's in the PATH?
BTW I'm looking at this issue that seems similar to what you are describing: https://github.com/flutter/flutter/issues/11698
You can try to use the Flutter Console with Administrator Access Privilege and try to change the change the channel to the current stable version flutter channel stable
Then, once again run the flutter upgrade.
I hope this help you.
Seems like you don't have enough privilege to save or edit files in that directory.
Try to run your command prompt as admin or try to run your flutter console as admin and check if that helps.
May be Antivirus or Firewall blocking
try running windows in Safe mode and then run flutter commands
On Windows, the simplest and easiest way is, download the latest version Flutter SDK. Manually replace the current folder by pasting the downloaded flutter folder instead of the current folder in the C drive. Always choose "replace and paste".
Related
Below is a short list of my setup until I stumble upon the HH12 Hardhat Error that I keep getting:
mkdir wave (Name of my directory)
cd wave
npm init -y
npm install —save-dev hardhat
npx hardhat
Choose sample project
6a. Hardhat project root (Select)
6b. Add .gitignore
Say yes to everything
install the remaining dependencies: npm install --save-dev #nomiclabs/hardhat-waffle ethereum-waffle chai #nomiclabs/hardhat-ethers ethers
npx hardhat accounts (to see all the different accounts)...
...And then it fails here! An HH12 Hardhat Error Message: "Hardhat is not installed or installed globally. You tried to run Hardhat from a global installation or not installing it at all. This is not supported. Please install Hardhat locally using npm or Yarn, and try again." (https://hardhat.org/errors/) [BTW, these 2 lines are the ONLY docs on this error on Hardhat!].
Any suggestions?
I have tried the following possible 'fixes' to sidestep this error but to no avail:
Updating most current version of node
Restarting my PC (About 17 X now as of this writing)
Using GitBash (Instead of Powershell)
Asking mods in Hardhat Discord (None) and other Discords
Opening the Hardhat docs (And the Tutorials!!) for answers... None!
StackExchange - There's literally only 1 other person who ALSO had this problem here! But the answers here are not the solution. (Have DMd that person but no reply as of yet).
So can anyone out there help?
I believe I finally figured out the solution (at least what worked for me):
I dropped back 2 directory levels from where I was for my root project and started again there.
I updated my Node version to 16.
I am trying to use mediapipe for a university project and have installed it, even successfully ran the Hello World! in C++ example app but when I am trying to build the C++ command-line example, it is giving me errors.
I ran this:
bazel build -c opt --define MEDIAPIPE_DISABLE_GPU=1 mediapipe/examples/desktop/hand_tracking:hand_tracking_cpu
and the result I got is this:
DEBUG: /private/var/tmp/_bazel_kanzashaikh/c191ae13e9137350b50f6a19ce94bf21/external/rules_foreign_cc/workspace_definitions.bzl:15:10: WARNING: This branch is deprecated and no longer recieving updates. Please update to main or choose a specific commit to pin in your workspace.
INFO: Build option --compilation_mode has changed, discarding analysis cache.
ERROR: Error fetching repository: java.io.IOException: The repository's path is "/usr/local/opt/opencv#3" (absolute: "/usr/local/opt/opencv#3") but this directory does not exist.
ERROR: /Users/kanzashaikh/development/mediapipe/third_party/BUILD:178:6: //third_party:opencv_binary depends on #macos_opencv//:opencv in repository #macos_opencv which failed to fetch. no such package '#macos_opencv//': The repository's path is "/usr/local/opt/opencv#3" (absolute: "/usr/local/opt/opencv#3") but this directory does not exist.
ERROR: Analysis of target '//mediapipe/examples/desktop/hand_tracking:hand_tracking_cpu' failed; build aborted: Analysis failed
INFO: Elapsed time: 0.194s
INFO: 0 processes.
FAILED: Build did NOT complete successfully (0 packages loaded, 237 targets co
nfigured)
How do I solve it?
before building desktop examples, you should setup opencv. also for android examples you should setup android sdk and ndk.
there is a builtin script for setting up opencv and you can execute it.
for setting up opencv:
bash setup_opencv.sh
and for android sdk and ndk:
bash setup_android_sdk_and_ndk.sh
I am assuming you are running a M1 machine, as Homebrew is now installing Intel binaries under /usr/local and ARM ones under /opt/homebrew.
In your case, when building, bazel is looking for opencv#3 package at /usr/local/opt/opencv#3 and immediately throws an error as the package is located at /opt/homebrew/opt/opencv#3.
Thus, you have two choices:
Open WORKSPACE file from your bazel project and modify the path for each package accordingly
Make a symbolic link to /opt/homebrew/opt in /usr/local by running: sudo ln -s /opt/homebrew/opt opt
I am starting to learn how to do mobile programming with ReactNative on an android environment. I’m using MacOS Catalina and I’ve installed android studio and react-native-cli. I ran react-native init ShoppingList which passed
Downloading template,
Copying template,
Processing template
but failed at Installing CocoaPods dependencies because I wasn't at the latest OS yet(I hope this is not part of the problem because I don’t have enough memory to upgrade OS)
I’ve referred to a suggestion inside this issue, which asks me to run
npm uninstall -g react-native react-native-cli
npm install -g react-native react-native-cli
react-native start --reset-cache
I’ve also deleted the node_modules and npm install at the root of the project. Then at the root of the project I ran react-native run-android.
Which gave me the following error
info Running jetifier to migrate libraries to AndroidX. You can disable it using "--no-jetifier" flag.
Jetifier found 967 file(s) to forward-jetify. Using 8 workers...
info Starting JS server...
/bin/sh: adb: command not found
info Launching emulator...
error Failed to launch emulator. Reason: No emulators found as an output of `emulator -list-avds`.
warn Please launch an emulator manually or connect a device. Otherwise app may fail to launch.
info Installing the app...
Deprecated Gradle features were used in this build, making it incompatible with Gradle 7.0.
Use '--warning-mode all' to show the individual deprecation warnings.
See https://docs.gradle.org/6.2/userguide/command_line_interface.html#sec:command_line_warnings
FAILURE: Build failed with an exception.
* What went wrong:
Could not determine the dependencies of task ':app:installDebug'.
> SDK location not found. Define location with an ANDROID_SDK_ROOT environment variable or by setting the sdk.dir path in your project's local properties file at '/Users/prashin/Test/ShoppingList/android/local.properties'.
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
* Get more help at https://help.gradle.org
BUILD FAILED in 2s
error Failed to install the app. Make sure you have the Android development environment set up: https://reactnative.dev/docs/environment-setup. Run CLI with --verbose flag for more details.
Error: Command failed: ./gradlew app:installDebug -PreactNativeDevServerPort=8081
Inside Android Studio, the following are installed
Android 11.0(R),
Android SDK Build-Tools,
Android Emulator 30.2.6,
Android SDK-Platform-Tools 30.0.5,
Intel x86 Emulator Accelerator (HAXM installer) 7.5.1
I created a Pixel 2 Device with Release name R(API Level 30), and pressed the Play button countless times, it gives me the error of AVD Manager: Unable to locate ADB.
This is my .bash_profile file.
source ~/.profile
# Setting PATH for Python 3.7
# The original version is saved in .bash_profile.pysave
PATH="/Library/Frameworks/Python.framework/Versions/3.7/bin:${PATH}"
export PATH
export NVM_DIR="$HOME/.nvm"
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm
[ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion" # This loads nvm bash_completion
##
# Your previous /Users/prashin/.bash_profile file was backed up as /Users/prashin/.bash_profile.macports-saved_2019-10-23_at_18:32:04
##
# MacPorts Installer addition on 2019-10-23_at_18:32:04: adding an appropriate PATH variable for use with MacPorts.
export PATH="/opt/local/bin:/opt/local/sbin:$PATH"
export ANDROID_HOME=/Users/prashin/Library/Android/sdk
export ANDROID_SDK_ROOT=$ANDROID_HOME
export PATH="$PATH:$ANDROID_HOME/emulator:$ANDROID_HOME/tools:$ANDROID_HOME/platform-tools"
# export PATH="$PATH:/Users/$USER/Library/Android/sdk/platform-tools"
# export PATH=${PATH}:/usr/local/mysql-5.7.31-macos10.14-x86_64/bin
# Finished adapting your PATH environment variable for use with MacPorts.
And I do see an adb executable inside platform-tools according to this post.
What could I be missing here which is preventing me from running my basic application on the simulator? Do inform me if more information is needed.
Edit
A suggested solution of switching to .zprofile changed the error message instead. It got stuck at info launching emulator for 30s before producing the error below.
error Failed to launch emulator. Reason: Could not start emulator within 30 seconds..
warn Please launch an emulator manually or connect a device. Otherwise app may fail to launch.
info Installing the app...
> Task :app:stripDebugDebugSymbols UP-TO-DATE
Compatible side by side NDK version was not found.
> Task :app:installDebug FAILED
Skipping device 'emulator-5554' (emulator-5554): Device is OFFLINE.
Deprecated Gradle features were used in this build, making it incompatible with Gradle 7.0.
Use '--warning-mode all' to show the individual deprecation warnings.
See https://docs.gradle.org/6.2/userguide/command_line_interface.html#sec:command_line_warnings
27 actionable tasks: 2 executed, 25 up-to-date
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':app:installDebug'.
> com.android.builder.testing.api.DeviceException: No online devices found.
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
* Get more help at https://help.gradle.org
BUILD FAILED in 4s
error Failed to install the app. Make sure you have the Android development environment set up: https://reactnative.dev/docs/environment-setup. Run CLI with --verbose flag for more details.
Error: Command failed: ./gradlew app:installDebug -PreactNativeDevServerPort=8081
With Catalina, Apple has changed the default shell to zsh. Therefore you have to rename your configuration files. .bashrc is now .zshrc and .bash_profile is now .zprofile. Move the contents of your .bash_profile to a new .zprofile file and restart your terminal. Run the app again with new environment variables in place.
Simply restarting the terminal made the trick for me...
Trying to install Freedos (v1.2) in Qemu - and it fails always with the same error: Unable to locate the installation packages..
On the web there are versions of the same guide on how to do this: https://opensource.com/article/17/10/run-dos-applications-linux
I can create the image for the hard drive, then run qemu:
qemu-system-i386 -m 16 -k en-us -rtc base=localtime -soundhw sb16,adlib -device cirrus-vga -cdrom FD12FULL/FD12FULL.img -hda freedos.img -boot order=d
The installation process starts successfully, it finds the hard drive images, then it formats it and mark as primary. Then I can select the language and start the installation - on the next screen it shows a dialogue to gather information about the machine - and the next screen is the failure:
I've tried the following options when starting qemu:
for cdrom using the "standard" / "legacy" / "full" / "lite" Freedos installation CD images
using both these 4 CD images with and without the official Freedos installation Floppy
booting from CD and booting from Floppy
attaching the CD img as img or as mounted drive
If I select No - Return to DOS I always see 3 drives: (A:) having the CD image, (B:) floppy image, (C:) the empty attached drive image and a (D:) drive which is not readable.
Looked at a few findings in google (case 1, case 2) but didn't really helped much.
seems to be a bug in seabios regarding support of ATA CDROMs, see https://patchwork.kernel.org/patch/10857581/ and https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=934134
In case anyone else is looking for an answer. The problem was due to a version of seabios that has a CD driver bug. If you download the latest version and compile it. You should be able to provide the "-bios <your_newer_compiled_seabios>" to the qemu command line to get around this problem.
What I did was follow these steps:
# Get a newer version of the seabios:
$ git clone https://git.seabios.org/seabios.git
# Change directory and compile it
$ cd seabios
$ make
...
Total size: 185536 Fixed: 87584 Free: 76608 (used 70.8% of 256KiB rom)
Creating out/bios.bin
Then I used the out/bios.bin bios in your qemu command line to load it:
$ <your-qemu-command-line> -bios out/bios.bin <any other command options>
Hope that helps other folks running into the same problem.
When I try to install Cocos2d-iphone 3.0.0 RC4, I got an error: (run without sudo)
Error -60005 occurred while executing script with privileges.
So, I try to show its package content and use terminal to do: cd ...Cocos2D Installer 3.0.0.app/Contents/MacOS
I try this command: (with sudo)
sudo ./Cocos2D\ Installer\ 3.0.0
It works but I got log with some errors:
[1m>>> Installing Cocos2D-v3.0.0 files (B[m
[1m>>> Installing Cocos2D-v3.0.0 templates (B[m
[4m[1mCocos2D Template Installer (Cocos2D-v3.0.0)(B[m
Error: [31m✖︎(B[m Script cannot be executed as root.
In order for it to work properly, please execute the script again without 'sudo'.
If you want to know more about how to use this script execute '/Users/viethung/Downloads/Cocos2D-v3.0.0/install.sh --help'.
[1m>>> Building/Installing Cocos2D-v3.0.0 documentation, this may take a minute.... (B[m
appledoc version: 2.2 (build 963)
Generation step 4/5 failed: GBDocSetInstallGenerator failed generating output, aborting!
Documentation set was installed, but couldn't reload documentation within Xcode.
Xcode got an error: No documentation set present at specified path.
[1m>>> Cocos2D-v3.0.0 installation complete! (B[m
Are there any way is better than this way?
I have same problem.
I think you installed old cocos2d-iphone and it caused this problem.
You should remove old cocos2d-iphone first. I removed:
~/Library/Developer/Xcode/cocos2d v3.x
And install again. It works for me.
Hope it works for you :)