using LinearAlgebra
julia> ones(3,2) \ ones(3)
2-element Vector{Float64}:
0.5
0.4999999999999999
julia> ones(3,3) \ ones(3)
ERROR: SingularException(2)
julia> ones(3,4) \ ones(3)
4-element Vector{Float64}:
0.2500000000000001
0.25
0.25
0.25
The issue here is that the LU decomposition used by Julia (which is just a call to BLAS), which is the default for square matrices, cannot handle singular matrices. The QR decomposition (with pivoting), which is the default for rectangular matrices, can support singular matrices. It’s not so pretty, but a workaround (until a more robust handling is implemented) is to specifically invoke QR with pivoting
julia> qr(ones(3,3),ColumnNorm()) \ ones(3)
3-element Vector{Float64}:
0.33333333333333337
0.33333333333333337
0.33333333333333337
I have opened an issue on github.