[verb ます-stem] + ようがない [verb ます-stem] + ようもない [noun] + の + [verb ます-stem] + ようがない
ようがない goes on the ます-stem of a verb and means "there is no way to do it": you would if you could, but there is no means or method. よう here is a noun, "way of doing", so なおし直しようがない is literally "there is no way of fixing". ようもない means the same with more force.
The sentence usually gives the reason first – no number, no evidence – and ようがない follows from it.
Since よう is a noun, the object of the verb usually takes の rather than を. A する-verb can split the same way: れんらく連絡しようがない or れんらく連絡のしようがない.
These go beyond "no way to do it".
Before a noun, ようがない becomes ようのない. いいようのない言いようのない is "indescribable".