avr-g++ : error: CreateProcess : No such file or directory

CreateProcess

I used Arduino for several years without any problem. But now, since some 15 days, I cannot verify or compile and get a message as:

avr-g++:error:CreateProcess:No such file or directory

This error message appears with any Arduino Uno (genuine or clone) or Mega
I use Windows 10 on my desk computer.
(On my portable I have no problem. All Arduino programs run correctly with Windows Vista)
It seems to be an uncompatibility with W10 on my desk computer.
Of course, avr-g++ exist, Path :Arduino>Hardware>tools>avr>bin !
On Google forums this problem seems to be existing since 2015...
But answers are not credible. Uninstalling Arduino and installing it again doesn't solve this problem, Can you help me? Thanks!

Please do this (preferably with a minimal sketch):

  • (In the Arduino IDE) click File > Preferences
  • Check the box next to "Show verbose output during: > compilation
  • Click "OK"
  • Sketch > Verify/Compile
  • After the compilation fails you'll see a button on the right side of the orange bar "Copy error messages". Click that button.
  • In a forum reply here, click on the reply field.
  • Click the </> button on the forum toolbar. This will add the forum's code tags markup to your reply.
  • Press "Ctrl + V". This will paste the compilation output between the code tags.
  • Move the cursor outside of the code tags before you add any additional text to your reply.

If the length of the output exceeds the forum's 9000 character limit, save it in a .txt file and post it here as an attachment. If you click the "Reply" button you'll see the "Attachments and other options" link.

Arduino: 1.8.2 (Windows 10), Board: "Arduino/Genuino Uno"

C:\Program Files (x86)\Arduino\arduino-builder -dump-prefs -logger=machine -hardware C:\Program Files (x86)\Arduino\hardware -hardware C:\Users\PierreYves\AppData\Local\Arduino15\packages -tools C:\Program Files (x86)\Arduino\tools-builder -tools C:\Program Files (x86)\Arduino\hardware\tools\avr -tools C:\Users\PierreYves\AppData\Local\Arduino15\packages -built-in-libraries C:\Program Files (x86)\Arduino\libraries -libraries C:\Users\PierreYves\Documents\Arduino\libraries -fqbn=arduino:avr:uno -ide-version=10802 -build-path C:\Users\PIERRE~1\AppData\Local\Temp\arduino_build_57669 -warnings=none -build-cache C:\Users\PIERRE~1\AppData\Local\Temp\arduino_cache_107973 -prefs=build.warn_data_percentage=75 -prefs=runtime.tools.avr-gcc.path=C:\Users\PierreYves\AppData\Local\Arduino15\packages\arduino\tools\avr-gcc\5.4.0-atmel3.6.1-arduino2 -prefs=runtime.tools.arduinoOTA.path=C:\Users\PierreYves\AppData\Local\Arduino15\packages\arduino\tools\arduinoOTA\1.2.1 -prefs=runtime.tools.avrdude.path=C:\Users\PierreYves\AppData\Local\Arduino15\packages\arduino\tools\avrdude\6.3.0-arduino14 -verbose C:\Users\PIERRE~1\AppData\Local\Temp\untitled751637984.tmp\sketch_mar19a\sketch_mar19a.ino
C:\Program Files (x86)\Arduino\arduino-builder -compile -logger=machine -hardware C:\Program Files (x86)\Arduino\hardware -hardware C:\Users\PierreYves\AppData\Local\Arduino15\packages -tools C:\Program Files (x86)\Arduino\tools-builder -tools C:\Program Files (x86)\Arduino\hardware\tools\avr -tools C:\Users\PierreYves\AppData\Local\Arduino15\packages -built-in-libraries C:\Program Files (x86)\Arduino\libraries -libraries C:\Users\PierreYves\Documents\Arduino\libraries -fqbn=arduino:avr:uno -ide-version=10802 -build-path C:\Users\PIERRE~1\AppData\Local\Temp\arduino_build_57669 -warnings=none -build-cache C:\Users\PIERRE~1\AppData\Local\Temp\arduino_cache_107973 -prefs=build.warn_data_percentage=75 -prefs=runtime.tools.avr-gcc.path=C:\Users\PierreYves\AppData\Local\Arduino15\packages\arduino\tools\avr-gcc\5.4.0-atmel3.6.1-arduino2 -prefs=runtime.tools.arduinoOTA.path=C:\Users\PierreYves\AppData\Local\Arduino15\packages\arduino\tools\arduinoOTA\1.2.1 -prefs=runtime.tools.avrdude.path=C:\Users\PierreYves\AppData\Local\Arduino15\packages\arduino\tools\avrdude\6.3.0-arduino14 -verbose C:\Users\PIERRE~1\AppData\Local\Temp\untitled751637984.tmp\sketch_mar19a\sketch_mar19a.ino
Using board 'uno' from platform in folder: C:\Users\PierreYves\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.6.23
Using core 'arduino' from platform in folder: C:\Users\PierreYves\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.6.23
Detecting libraries used...
"C:\Users\PierreYves\AppData\Local\Arduino15\packages\arduino\tools\avr-gcc\5.4.0-atmel3.6.1-arduino2/bin/avr-g++" -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -Wno-error=narrowing  -flto -w -x c++ -E -CC -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10802 -DARDUINO_AVR_UNO -DARDUINO_ARCH_AVR   "-IC:\Users\PierreYves\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.6.23\cores\arduino" "-IC:\Users\PierreYves\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.6.23\variants\standard" "C:\Users\PIERRE~1\AppData\Local\Temp\arduino_build_57669\sketch\sketch_mar19a.ino.cpp" -o "nul"
Generating function prototypes...
"C:\Users\PierreYves\AppData\Local\Arduino15\packages\arduino\tools\avr-gcc\5.4.0-atmel3.6.1-arduino2/bin/avr-g++" -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -Wno-error=narrowing  -flto -w -x c++ -E -CC -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10802 -DARDUINO_AVR_UNO -DARDUINO_ARCH_AVR   "-IC:\Users\PierreYves\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.6.23\cores\arduino" "-IC:\Users\PierreYves\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.6.23\variants\standard" "C:\Users\PIERRE~1\AppData\Local\Temp\arduino_build_57669\sketch\sketch_mar19a.ino.cpp" -o "C:\Users\PIERRE~1\AppData\Local\Temp\arduino_build_57669\preproc\ctags_target_for_gcc_minus_e.cpp"
"C:\Program Files (x86)\Arduino\tools-builder\ctags\5.8-arduino11/ctags" -u --language-force=c++ -f - --c++-kinds=svpf --fields=KSTtzns --line-directives "C:\Users\PIERRE~1\AppData\Local\Temp\arduino_build_57669\preproc\ctags_target_for_gcc_minus_e.cpp"
Compiling sketch...
"C:\Users\PierreYves\AppData\Local\Arduino15\packages\arduino\tools\avr-gcc\5.4.0-atmel3.6.1-arduino2/bin/avr-g++" -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -Wno-error=narrowing -MMD -flto -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10802 -DARDUINO_AVR_UNO -DARDUINO_ARCH_AVR   "-IC:\Users\PierreYves\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.6.23\cores\arduino" "-IC:\Users\PierreYves\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.6.23\variants\standard" "C:\Users\PIERRE~1\AppData\Local\Temp\arduino_build_57669\sketch\sketch_mar19a.ino.cpp" -o "C:\Users\PIERRE~1\AppData\Local\Temp\arduino_build_57669\sketch\sketch_mar19a.ino.cpp.o"
avr-g++: error: CreateProcess: No such file or directory

exit status 1
Error compiling for board Arduino/Genuino Uno.

This error indicates you need to take some drastic action. Be aware this is somewhat advanced and will remove any boards you have installed via Boards Manager:

  • In the Arduino IDE, click the link on the line following File > Preferences > More preferences can be edited directly in the file. This will open the C:\Users\PierreYves\AppData\Local\Arduino15 folder.
  • Delete all files and folders under the Arduino15 folder except for preferences.txt. Please be very careful when deleting things from your computer. When in doubt, back up!
  • Restart the Arduino IDE

Verify that you can now use your Uno before reinstalling any packages via Boards Manager.

It's working! Hurrah. Thanks!

You're welcome. I'm glad to hear it's working now. Enjoy!
Per

me to this is my error

avr-g++: error: CreateProcess: No such file or directory

exit status 1
Error compiling for board Arduino/Genuino Uno.

I'm having this same issue while trying to compile the latest Marlin release.

I tried deleting the file in the directory discussed in this thread, but no luck. I have attached the verbose error output, due to the character limit.

-------------EDIT-------------

Tried redoing it without the cached/temp files...
Still no luck.

verbose error.txt (232 KB)

verbose error 2.txt (961 KB)

Detecting libraries used...
"C:\\Program Files (x86)\\Arduino\\hardware\\tools\\avr/bin/avr-g++" -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -Wno-error=narrowing -flto -w -x c++ -E -CC -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10813 -DARDUINO_AVR_UNO -DARDUINO_ARCH_AVR "-IC:\\Program Files (x86)\\Arduino\\hardware\\arduino\\avr\\cores\\arduino" "-IC:\\Program Files (x86)\\Arduino\\hardware\\arduino\\avr\\variants\\standard" "C:\\Users\\Tinzar\\AppData\\Local\\Temp\\arduino_build_387069\\sketch\\Servo_Knob_Test.ino.cpp" -o nul -DARDUINO_LIB_DISCOVERY_PHASE
Alternatives for Servo.h: [Servo-1.1.7@1.1.7 Servo@1.1.6 Servo@1.1.7]
ResolveLibrary(Servo.h)
  -> candidates: [Servo-1.1.7@1.1.7 Servo@1.1.6 Servo@1.1.7]
"C:\\Program Files (x86)\\Arduino\\hardware\\tools\\avr/bin/avr-g++" -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -Wno-error=narrowing -flto -w -x c++ -E -CC -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10813 -DARDUINO_AVR_UNO -DARDUINO_ARCH_AVR "-IC:\\Program Files (x86)\\Arduino\\hardware\\arduino\\avr\\cores\\arduino" "-IC:\\Program Files (x86)\\Arduino\\hardware\\arduino\\avr\\variants\\standard" "-ID:\\Online Class 2020\\Arduino Online Course\\ArduinoTestFiles\\libraries\\Servo\\src" "C:\\Users\\Tinzar\\AppData\\Local\\Temp\\arduino_build_387069\\sketch\\Servo_Knob_Test.ino.cpp" -o nul -DARDUINO_LIB_DISCOVERY_PHASE
"C:\\Program Files (x86)\\Arduino\\hardware\\tools\\avr/bin/avr-g++" -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -Wno-error=narrowing -flto -w -x c++ -E -CC -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10813 -DARDUINO_AVR_UNO -DARDUINO_ARCH_AVR "-IC:\\Program Files (x86)\\Arduino\\hardware\\arduino\\avr\\cores\\arduino" "-IC:\\Program Files (x86)\\Arduino\\hardware\\arduino\\avr\\variants\\standard" "-ID:\\Online Class 2020\\Arduino Online Course\\ArduinoTestFiles\\libraries\\Servo\\src" "D:\\Online Class 2020\\Arduino Online Course\\ArduinoTestFiles\\libraries\\Servo\\src\\avr\\Servo.cpp" -o nul -DARDUINO_LIB_DISCOVERY_PHASE
"C:\\Program Files (x86)\\Arduino\\hardware\\tools\\avr/bin/avr-g++" -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -Wno-error=narrowing -flto -w -x c++ -E -CC -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10813 -DARDUINO_AVR_UNO -DARDUINO_ARCH_AVR "-IC:\\Program Files (x86)\\Arduino\\hardware\\arduino\\avr\\cores\\arduino" "-IC:\\Program Files (x86)\\Arduino\\hardware\\arduino\\avr\\variants\\standard" "-ID:\\Online Class 2020\\Arduino Online Course\\ArduinoTestFiles\\libraries\\Servo\\src" "D:\\Online Class 2020\\Arduino Online Course\\ArduinoTestFiles\\libraries\\Servo\\src\\mbed\\Servo.cpp" -o nul -DARDUINO_LIB_DISCOVERY_PHASE
"C:\\Program Files (x86)\\Arduino\\hardware\\tools\\avr/bin/avr-g++" -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -Wno-error=narrowing -flto -w -x c++ -E -CC -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10813 -DARDUINO_AVR_UNO -DARDUINO_ARCH_AVR "-IC:\\Program Files (x86)\\Arduino\\hardware\\arduino\\avr\\cores\\arduino" "-IC:\\Program Files (x86)\\Arduino\\hardware\\arduino\\avr\\variants\\standard" "-ID:\\Online Class 2020\\Arduino Online Course\\ArduinoTestFiles\\libraries\\Servo\\src" "D:\\Online Class 2020\\Arduino Online Course\\ArduinoTestFiles\\libraries\\Servo\\src\\megaavr\\Servo.cpp" -o nul -DARDUINO_LIB_DISCOVERY_PHASE
"C:\\Program Files (x86)\\Arduino\\hardware\\tools\\avr/bin/avr-g++" -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -Wno-error=narrowing -flto -w -x c++ -E -CC -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10813 -DARDUINO_AVR_UNO -DARDUINO_ARCH_AVR "-IC:\\Program Files (x86)\\Arduino\\hardware\\arduino\\avr\\cores\\arduino" "-IC:\\Program Files (x86)\\Arduino\\hardware\\arduino\\avr\\variants\\standard" "-ID:\\Online Class 2020\\Arduino Online Course\\ArduinoTestFiles\\libraries\\Servo\\src" "D:\\Online Class 2020\\Arduino Online Course\\ArduinoTestFiles\\libraries\\Servo\\src\\nrf52\\Servo.cpp" -o nul -DARDUINO_LIB_DISCOVERY_PHASE
"C:\\Program Files (x86)\\Arduino\\hardware\\tools\\avr/bin/avr-g++" -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -Wno-error=narrowing -flto -w -x c++ -E -CC -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10813 -DARDUINO_AVR_UNO -DARDUINO_ARCH_AVR "-IC:\\Program Files (x86)\\Arduino\\hardware\\arduino\\avr\\cores\\arduino" "-IC:\\Program Files (x86)\\Arduino\\hardware\\arduino\\avr\\variants\\standard" "-ID:\\Online Class 2020\\Arduino Online Course\\ArduinoTestFiles\\libraries\\Servo\\src" "D:\\Online Class 2020\\Arduino Online Course\\ArduinoTestFiles\\libraries\\Servo\\src\\sam\\Servo.cpp" -o nul -DARDUINO_LIB_DISCOVERY_PHASE
"C:\\Program Files (x86)\\Arduino\\hardware\\tools\\avr/bin/avr-g++" -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -Wno-error=narrowing -flto -w -x c++ -E -CC -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10813 -DARDUINO_AVR_UNO -DARDUINO_ARCH_AVR "-IC:\\Program Files (x86)\\Arduino\\hardware\\arduino\\avr\\cores\\arduino" "-IC:\\Program Files (x86)\\Arduino\\hardware\\arduino\\avr\\variants\\standard" "-ID:\\Online Class 2020\\Arduino Online Course\\ArduinoTestFiles\\libraries\\Servo\\src" "D:\\Online Class 2020\\Arduino Online Course\\ArduinoTestFiles\\libraries\\Servo\\src\\samd\\Servo.cpp" -o nul -DARDUINO_LIB_DISCOVERY_PHASE
"C:\\Program Files (x86)\\Arduino\\hardware\\tools\\avr/bin/avr-g++" -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -Wno-error=narrowing -flto -w -x c++ -E -CC -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10813 -DARDUINO_AVR_UNO -DARDUINO_ARCH_AVR "-IC:\\Program Files (x86)\\Arduino\\hardware\\arduino\\avr\\cores\\arduino" "-IC:\\Program Files (x86)\\Arduino\\hardware\\arduino\\avr\\variants\\standard" "-ID:\\Online Class 2020\\Arduino Online Course\\ArduinoTestFiles\\libraries\\Servo\\src" "D:\\Online Class 2020\\Arduino Online Course\\ArduinoTestFiles\\libraries\\Servo\\src\\stm32f4\\Servo.cpp" -o nul -DARDUINO_LIB_DISCOVERY_PHASE
Generating function prototypes...
"C:\\Program Files (x86)\\Arduino\\hardware\\tools\\avr/bin/avr-g++" -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -Wno-error=narrowing -flto -w -x c++ -E -CC -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10813 -DARDUINO_AVR_UNO -DARDUINO_ARCH_AVR "-IC:\\Program Files (x86)\\Arduino\\hardware\\arduino\\avr\\cores\\arduino" "-IC:\\Program Files (x86)\\Arduino\\hardware\\arduino\\avr\\variants\\standard" "-ID:\\Online Class 2020\\Arduino Online Course\\ArduinoTestFiles\\libraries\\Servo\\src" "C:\\Users\\Tinzar\\AppData\\Local\\Temp\\arduino_build_387069\\sketch\\Servo_Knob_Test.ino.cpp" -o "C:\\Users\\Tinzar\\AppData\\Local\\Temp\\arduino_build_387069\\preproc\\ctags_target_for_gcc_minus_e.cpp" -DARDUINO_LIB_DISCOVERY_PHASE
"C:\\Program Files (x86)\\Arduino\\tools-builder\\ctags\\5.8-arduino11/ctags" -u --language-force=c++ -f - --c++-kinds=svpf --fields=KSTtzns --line-directives "C:\\Users\\Tinzar\\AppData\\Local\\Temp\\arduino_build_387069\\preproc\\ctags_target_for_gcc_minus_e.cpp"
Compiling sketch...
"C:\\Program Files (x86)\\Arduino\\hardware\\tools\\avr/bin/avr-g++" -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -Wno-error=narrowing -MMD -flto -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10813 -DARDUINO_AVR_UNO -DARDUINO_ARCH_AVR "-IC:\\Program Files (x86)\\Arduino\\hardware\\arduino\\avr\\cores\\arduino" "-IC:\\Program Files (x86)\\Arduino\\hardware\\arduino\\avr\\variants\\standard" "-ID:\\Online Class 2020\\Arduino Online Course\\ArduinoTestFiles\\libraries\\Servo\\src" "C:\\Users\\Tinzar\\AppData\\Local\\Temp\\arduino_build_387069\\sketch\\Servo_Knob_Test.ino.cpp" -o "C:\\Users\\Tinzar\\AppData\\Local\\Temp\\arduino_build_387069\\sketch\\Servo_Knob_Test.ino.cpp.o"
avr-g++: error: CreateProcess: No such file or directory
Multiple libraries were found for "Servo.h"
 Used: D:\Online Class 2020\Arduino Online Course\ArduinoTestFiles\libraries\Servo
 Not used: D:\Online Class 2020\Arduino Online Course\ArduinoTestFiles\libraries\Servo-1.1.7
 Not used: C:\Program Files (x86)\Arduino\libraries\Servo
Using library Servo at version 1.1.7 in folder: D:\Online Class 2020\Arduino Online Course\ArduinoTestFiles\libraries\Servo 
exit status 1
Error compiling for board Arduino Uno.