I'm trying to create a new database using sqlite but I keep getting the following error:
sqlite3 new.db
SQLite version 3.3.6
Enter ".help" for instructions
sqlite> begin immediate;
SQL error: database is locked
I tried building the latest sqlite from source and I get the following error:
sqlite3 new.db
SQLite version 3.8.8.3 2015-02-25 13:29:11
Enter ".help" for usage hints.
Error: disk I/O error
I have free disk space and I tried creating a copy of database file as suggested in disk I/O error with SQLite but without any luck.
All solutions to similar questions point to an issue where the database is locked by another process. But that shouldn't happen in this case.
It looks like an environment problem, but I don't have any idea about the source of this problem.
Has anyone come across something similar?
EDIT: This error was caused by the filesystem. The filesystem in question was an older version and evidently it didn't support cluster locking. There are many other SO questions regarding sqlite databases on nfs.