Compilation errors after update

I have a program that I have been working on and the setup has been fine. I started the ide and connected my esp32 and the ide in the output section asked if I wanted to update something and its dependencies so I said yes. I think it is to do with wire.h and twowire? and it seems that the soc.h file is gone too. I am not sure of the protocol, so I have only posted some of the compilation errors, which I suspect are not errors related to the sketch as it has been working fine with no change to the working code.


*
#include <Wire.h>
#include <Adafruit_MCP23X17.h>


Adafruit_MCP23X17 mcp;

Here are a small pice of the compile errors:
In file included from

C:\Users\peter\AppData\Local\Arduino15\packages\esp32\hardware\esp32\3.0.5\libraries\Wire\src/Wire.h:39,
                 from C:\Users\peter\OneDrive\Documents\Arduino\Traffic_Lights_Fully_Working_copy_for_updates\Traffic_Lights_Fully_Working_copy_for_updates.ino:2:
C:\Users\peter\AppData\Local\Arduino15\packages\esp32\hardware\esp32\3.0.5\cores\esp32/HardwareI2C.h:24:1: error: expected unqualified-id before 'class'
   24 | class HardwareI2C : public Stream {
      | ^~~~~
C:\Users\peter\AppData\Local\Arduino15\packages\esp32\hardware\esp32\3.0.5\libraries\Wire\src/Wire.h:55:36: error: expected class-name before '{' token
   55 | class TwoWire : public HardwareI2C {
      |                                    ^
C:\Users\peter\AppData\Local\Arduino15\packages\esp32\hardware\esp32\3.0.5\libraries\Wire\src/Wire.h:92:8: error: 'bool TwoWire::begin()' marked 'override', but does not override
   92 |   bool begin() override final {
      |        ^~~~~
C:\Users\peter\AppData\Local\Arduino15\packages\esp32\hardware\esp32\3.0.5\libraries\Wire\src/Wire.h:92:8: error: 'bool TwoWire::begin()' marked 'final', but is not virtual
C:\Users\peter\AppData\Local\Arduino15\packages\esp32\hardware\esp32\3.0.5\libraries\Wire\src/Wire.h:96:8: error: 'bool TwoWire::begin(uint8_t)' marked 'override', but does not override
   96 |   bool begin(uint8_t address) override final {
      |        ^~~~~

Help would be very much appreciated, as searching just takes me to github and the libraries which were the latest ones.
Please excuse any typos I missed as I have Parkinsons' so typing can be difficult.

My apologies if I have posted to the wrong category.

I decided to build up the code on another of the same type of board and everything works on the new board so my esp32 is faulty. Thank you for those that took the time to read this post. How do I close this post as solved?

It's difficult to advise if you don't know what you exactly did update. But maybe you did upgrade the ESP32 board package from V2.x to V3.x. If so, there were breaking changes.

The 3.0.5 at the end indicates that you're using the latest version. One possible solution is to roll back to version 2.x of the board packages using the board manager.

And there is the migration guide to guide you if you want to change your code to work with the latest board package: Migration from 2.x to 3.0 - - — Arduino ESP32 latest documentation

Quick question:
Which version of the IDE are you using?

There is a checkbox under the replies; you can click the one under the most useful reply to show that a solution was provided/found.

Or you can edit the title of your topic and put something like [solved] in front of it.

I found the solved button.

Thank you for the reply. The board was faulty and I hadn't anticipated that. Thank you so much for your time.

Faulty boards don't result in compile errors like you showed.