Old thread but it was my first search result so might as well contribute to it
Shawn's answer slightly modified for Windows PowerShell did the trick for me
.\sqlite3.exe mydatabase.sqlite ".schema --nosys" | .\sqlite3.exe copy.sqlite
Ignoring the intermediate file, this is doing the same as bells' 5-step command, with the --nosys option omitting the auto generated "sqlite_..." tables which are the source of the error
Also, JIC for someone just starting with SQLite which might only interface with it from client code (e.g. C, python, etc.), the sqlite3 program can be downloaded from the official SQLite website. I used the 3.47.2 version (for x64)