This is a very good example why it is not recommended to deviate from the book. Especially if you have no idea what you are doing.
This
Code:
-e 's@/lib\(64\)\?/ld@$TARGETDIR&@g' \
is not what you were supposed to issue in chapter 5.8. As you can see, the statement is enclosed in single quotes, i.e. it got not expanded by bash as you thought it would. Also
Code:
[Requesting program interpreter: $TARGETDIR/lib64/ld-linux-x86-64.so.2]
This should had at least been whatever is stored in $TARGETDIR. I don't know what is stored in $TARGETDIR but I assume it will not work as you expect it to - even if you correct your previous statement and $TARGETDIR would get expanded in the sed statement. It would be probably best if you start over again and follow the book by the letter.
Code:
checking for gcc... x86_64-installOS-linux-gnu-gcc -B/root/installOS/os/lib/
Are you installing your toolchain on your host system? Again, do NOT deviate from the book.