Be interesting to see how this evolves. Historically this sort of collateral casualty scenario has turned countries from neutral to belligerent (e.g., sinking the Lusitania).
I doubt Libya will declare war on Ukraine, but Ukraine will need to apologize and make reparations.
At the same time, Libya decided to conduct business with Russia - who has been at war for almost 5 years now - so Libya knowingly embraced some risks.
Sinking Russian ships is always a good idea, though. Every other port that docks Russian ships *especially military ships* needs to pay attention to this event and reassess their risk tolerance.