Oh yeah. I'm totally new to all this, and I had that same error message at one point as well. I missed the part where you need a nougat bootloader for lineage.
I had to FORMAT DATA, and it went through.
What was your error message above the error 7 line? Mine was something along the lines of "cannot write over a package that already exists" or something to that nature.