I need to I2C and pin toggle and read
Well THAT should not be an issue, but since you are running full Ubuntu I doubt it is in the standard libraries.
For the pin toggling etc I wrote the type helper extensions in sysutils with originally specifically the Raspberry Pi in mind.
That should already be enough.
So yes, compiled from source, that would work, but I have a different set up. (Raspberry OS, but the same hardware)