Avr-g++: no such file or directory on Mac

Hi everyone, I am an engineering student from Malaysia.
I had tried to upload my code to Arduino but not successful.

I keep having the error saying avr-g++: no such file or directory.

I'm using a Macbook. Would like to seek advice from everyone regarding this error.


Which "Arduino" are You talking about? There are some 20 of them and several needs special selection in the IDE menue.

I don't see any error messages in your screenshots.

i'm using Arduino Uno

I tried the MFRC522 DumpInfo example, I able to upload the code to arduino.
From the serial monitor, it able to see Scan PICC to see UID, SAK, type, and data blocks...

But, no input is shown.

So you can compile and upload and see feedback from the code in the console through the serial to usb connection. Seems the first part works.

Now you have to focus on your circuit.

Do yourself a favour and please read How to get the best out of this forum and provide all the necessary info (and code within code tags)

Also please, please never ever again post pictures of text... Not only they are not readable nor usable directly for copy&paste but they use up lots of storage and internet bandwidth which contributes to polluting the planet. (Just copy and paste the text within code tags for example)

2 Likes

Your output clearly shows "WARNING! Communication failure, is the MFRC522 properly connected?".

Check your wiring.

1 Like

Thank you for your feedback!

I didnt solder the MFRC522, instead, I just plugged it into the breadboard.
Do I have to solder it? Or just plugging in will do?

Yes. Just poking the pins through the holes on the PCB does not make a good connection. For the right-angle pins you have, you would usually put the short ends through the board and solder them. The longer ends would be sticking out on the end of the board.

Rather than plugging the male pins into a breadboard and using male-to-male wires, you could eliminate the breadboard by using female-to-male wires.

Thank you for your response. It works for me. My RFID able to read the data now. Really appreciate it.

However, I'm facing another issue. I was trying to complete my project with RFID Attendance Tracker. I want to upload my data to Adafruit using NodeMCU.

Not sure why when i run codes for NodeMCU, it has this error.

Can you help me with this?

Error code:
Traceback (most recent call last):
File "/Users/patricktan/Library/Arduino15/packages/esp8266/hardware/esp8266/3.0.2/tools/pyserial/serial/serialposix.py", line 322, in open
self.fd = os.open(self.portstr, os.O_RDWR | os.O_NOCTTY | os.O_NONBLOCK)
OSError: [Errno 16] Resource busy: '/dev/cu.wchusbserial130'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/Users/patricktan/Library/Arduino15/packages/esp8266/hardware/esp8266/3.0.2/tools/upload.py", line 66, in
esptool.main(cmdline)
File "/Users/patricktan/Library/Arduino15/packages/esp8266/hardware/esp8266/3.0.2/tools/esptool/esptool.py", line 3551, in main
esp = chip_class(each_port, initial_baud, args.trace)
File "/Users/patricktan/Library/Arduino15/packages/esp8266/hardware/esp8266/3.0.2/tools/esptool/esptool.py", line 271, in init
self._port = serial.serial_for_url(port)
File "/Users/patricktan/Library/Arduino15/packages/esp8266/hardware/esp8266/3.0.2/tools/pyserial/serial/init.py", line 90, in serial_for_url
instance.open()
File "/Users/patricktan/Library/Arduino15/packages/esp8266/hardware/esp8266/3.0.2/tools/pyserial/serial/serialposix.py", line 325, in open
raise SerialException(msg.errno, "could not open port {}: {}".format(self._port, msg))
serial.serialutil.SerialException: [Errno 16] could not open port /dev/cu.wchusbserial130: [Errno 16] Resource busy: '/dev/cu.wchusbserial130'
Failed uploading: uploading error: exit status 1

I think that once you figure out why the port is busy and fix that, the other exception won't be a problem.

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.