Installing ROS.jl error

Which Julia version do you use?

I think Cxx.jl does not work with Julia 1.7.

Please, note that Cxx.jl only works (out of the box) currently with Julia 1.1.x to 1.3.x, i.e. with no currently supported Julia, while those versions can still be downloaded at Julialang.org.

So just install Julia 1.3 …

You can use different versions of Julia per project with the help of GitHub - johnnychen94/jill.py: A cross-platform installer for the Julia programming language