开发板连接选择都没错,在windows下的Arduino IDE里可以正常上传,Linux下的arduino IDE上传错误,报错如图
详细报错:
Arduino:1.8.12 (Linux), 开发板:"Arduino Micro"
/root/myfile/arduino-1.8.12/arduino-builder -dump-prefs -logger=machine -hardware /root/myfile/arduino-1.8.12/hardware -tools /root/myfile/arduino-1.8.12/tools-builder -tools /root/myfile/arduino-1.8.12/hardware/tools/avr -built-in-libraries /root/myfile/arduino-1.8.12/libraries -libraries /root/Arduino/libraries -fqbn=arduino:avr:micro -vid-pid=0X2341_0X8037 -ide-version=10812 -build-path /tmp/arduino_build_72520 -warnings=none -build-cache /tmp/arduino_cache_566623 -prefs=build.warn_data_percentage=75 -prefs=runtime.tools.avrdude.path=/root/myfile/arduino-1.8.12/hardware/tools/avr -prefs=runtime.tools.avrdude-6.3.0-arduino17.path=/root/myfile/arduino-1.8.12/hardware/tools/avr -prefs=runtime.tools.arduinoOTA.path=/root/myfile/arduino-1.8.12/hardware/tools/avr -prefs=runtime.tools.arduinoOTA-1.3.0.path=/root/myfile/arduino-1.8.12/hardware/tools/avr -prefs=runtime.tools.avr-gcc.path=/root/myfile/arduino-1.8.12/hardware/tools/avr -prefs=runtime.tools.avr-gcc-7.3.0-atmel3.6.1-arduino5.path=/root/myfile/arduino-1.8.12/hardware/tools/avr -verbose /root/Arduino/sketch_mar11a/sketch_mar11a.ino
/root/myfile/arduino-1.8.12/arduino-builder -compile -logger=machine -hardware /root/myfile/arduino-1.8.12/hardware -tools /root/myfile/arduino-1.8.12/tools-builder -tools /root/myfile/arduino-1.8.12/hardware/tools/avr -built-in-libraries /root/myfile/arduino-1.8.12/libraries -libraries /root/Arduino/libraries -fqbn=arduino:avr:micro -vid-pid=0X2341_0X8037 -ide-version=10812 -build-path /tmp/arduino_build_72520 -warnings=none -build-cache /tmp/arduino_cache_566623 -prefs=build.warn_data_percentage=75 -prefs=runtime.tools.avrdude.path=/root/myfile/arduino-1.8.12/hardware/tools/avr -prefs=runtime.tools.avrdude-6.3.0-arduino17.path=/root/myfile/arduino-1.8.12/hardware/tools/avr -prefs=runtime.tools.arduinoOTA.path=/root/myfile/arduino-1.8.12/hardware/tools/avr -prefs=runtime.tools.arduinoOTA-1.3.0.path=/root/myfile/arduino-1.8.12/hardware/tools/avr -prefs=runtime.tools.avr-gcc.path=/root/myfile/arduino-1.8.12/hardware/tools/avr -prefs=runtime.tools.avr-gcc-7.3.0-atmel3.6.1-arduino5.path=/root/myfile/arduino-1.8.12/hardware/tools/avr -verbose /root/Arduino/sketch_mar11a/sketch_mar11a.ino
Using board 'micro' from platform in folder: /root/myfile/arduino-1.8.12/hardware/arduino/avr
Using core 'arduino' from platform in folder: /root/myfile/arduino-1.8.12/hardware/arduino/avr
Detecting libraries used...
/root/myfile/arduino-1.8.12/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=atmega32u4 -DF_CPU=16000000L -DARDUINO=10812 -DARDUINO_AVR_MICRO -DARDUINO_ARCH_AVR -DUSB_VID=0x2341 -DUSB_PID=0x8037 "-DUSB_MANUFACTURER=\"Unknown\"" "-DUSB_PRODUCT=\"Arduino Micro\"" -I/root/myfile/arduino-1.8.12/hardware/arduino/avr/cores/arduino -I/root/myfile/arduino-1.8.12/hardware/arduino/avr/variants/micro /tmp/arduino_build_72520/sketch/sketch_mar11a.ino.cpp -o /dev/null
Alternatives for Keyboard.h: [Keyboard@1.0.2]
ResolveLibrary(Keyboard.h)
-> candidates: [Keyboard@1.0.2]
/root/myfile/arduino-1.8.12/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=atmega32u4 -DF_CPU=16000000L -DARDUINO=10812 -DARDUINO_AVR_MICRO -DARDUINO_ARCH_AVR -DUSB_VID=0x2341 -DUSB_PID=0x8037 "-DUSB_MANUFACTURER=\"Unknown\"" "-DUSB_PRODUCT=\"Arduino Micro\"" -I/root/myfile/arduino-1.8.12/hardware/arduino/avr/cores/arduino -I/root/myfile/arduino-1.8.12/hardware/arduino/avr/variants/micro -I/root/myfile/arduino-1.8.12/libraries/Keyboard/src /tmp/arduino_build_72520/sketch/sketch_mar11a.ino.cpp -o /dev/null
Alternatives for HID.h: [HID@1.0]
ResolveLibrary(HID.h)
-> candidates: [HID@1.0]
/root/myfile/arduino-1.8.12/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=atmega32u4 -DF_CPU=16000000L -DARDUINO=10812 -DARDUINO_AVR_MICRO -DARDUINO_ARCH_AVR -DUSB_VID=0x2341 -DUSB_PID=0x8037 "-DUSB_MANUFACTURER=\"Unknown\"" "-DUSB_PRODUCT=\"Arduino Micro\"" -I/root/myfile/arduino-1.8.12/hardware/arduino/avr/cores/arduino -I/root/myfile/arduino-1.8.12/hardware/arduino/avr/variants/micro -I/root/myfile/arduino-1.8.12/libraries/Keyboard/src -I/root/myfile/arduino-1.8.12/hardware/arduino/avr/libraries/HID/src /tmp/arduino_build_72520/sketch/sketch_mar11a.ino.cpp -o /dev/null
/root/myfile/arduino-1.8.12/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=atmega32u4 -DF_CPU=16000000L -DARDUINO=10812 -DARDUINO_AVR_MICRO -DARDUINO_ARCH_AVR -DUSB_VID=0x2341 -DUSB_PID=0x8037 "-DUSB_MANUFACTURER=\"Unknown\"" "-DUSB_PRODUCT=\"Arduino Micro\"" -I/root/myfile/arduino-1.8.12/hardware/arduino/avr/cores/arduino -I/root/myfile/arduino-1.8.12/hardware/arduino/avr/variants/micro -I/root/myfile/arduino-1.8.12/libraries/Keyboard/src -I/root/myfile/arduino-1.8.12/hardware/arduino/avr/libraries/HID/src /root/myfile/arduino-1.8.12/libraries/Keyboard/src/Keyboard.cpp -o /dev/null
/root/myfile/arduino-1.8.12/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=atmega32u4 -DF_CPU=16000000L -DARDUINO=10812 -DARDUINO_AVR_MICRO -DARDUINO_ARCH_AVR -DUSB_VID=0x2341 -DUSB_PID=0x8037 "-DUSB_MANUFACTURER=\"Unknown\"" "-DUSB_PRODUCT=\"Arduino Micro\"" -I/root/myfile/arduino-1.8.12/hardware/arduino/avr/cores/arduino -I/root/myfile/arduino-1.8.12/hardware/arduino/avr/variants/micro -I/root/myfile/arduino-1.8.12/libraries/Keyboard/src -I/root/myfile/arduino-1.8.12/hardware/arduino/avr/libraries/HID/src /root/myfile/arduino-1.8.12/hardware/arduino/avr/libraries/HID/src/HID.cpp -o /dev/null
Generating function prototypes...
/root/myfile/arduino-1.8.12/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=atmega32u4 -DF_CPU=16000000L -DARDUINO=10812 -DARDUINO_AVR_MICRO -DARDUINO_ARCH_AVR -DUSB_VID=0x2341 -DUSB_PID=0x8037 "-DUSB_MANUFACTURER=\"Unknown\"" "-DUSB_PRODUCT=\"Arduino Micro\"" -I/root/myfile/arduino-1.8