Apt update && apt upgrade issue on Jetpack 6.2

I have NVIDIA® Jetson Orin™ NX 16GB AI Device - reComputer J4012.
And when I am trying to install some library(labelme), I am getting error "/opt/rh/gcc-toolset-14/root/usr/include/c++/14/bits/stl_vector.h:1130: std::vector<_Tp, _Alloc>::reference std::vector<_Tp, _Alloc>::operator [with _Tp = unsigned int; _Alloc = std::allocator; reference = unsigned int&; size_type = long unsigned int]: Assertion ‘__n < this->size()’ failed.
Aborted (core dumped)
"
Can you help me out in finding the root cause of this bug and guide me for solution since this issue is related to this system not library.