I guess your PETSc installation has some problem, which causes it is not successfully included in FEniCSx’ installation. You may want to use the one or several of the following:
PETSC_ARCH=linux-gnu-real32-32:linux-gnu-complex64-32:linux-gnu-real64-32:linux-gnu-complex128-32:linux-gnu-real64-64:linux-gnu-complex128-64
See the recommended installation by the FEniCS dev team: dolfinx/docker/Dockerfile.test-env at d04eba8996a51a5e0c2d02691577da81302ab0fe · FEniCS/dolfinx · GitHub
and also the way to install FEniCSx: Build 64bit petsc and dolfinx v0.8.0 - #3 by dokken