Solved "Cannot update the portsdb!" error

Several last tries to use portupgrade gave me this error:
Code:
[Reading data from pkg(8) ... - 1644 packages found - done]
[Updating the portsdb <format:bdb_btree> in /usr/ports ... - 27409 port entries found Unknown error: 1024: Cannot update the portsdb! (/usr/ports/INDEX-10.db)]
database file error
[Updating the portsdb <format:bdb_btree> in /usr/ports ... - 27409 port entries found Unknown error: 1024: Cannot update the portsdb! (/usr/ports/INDEX-10.db)]
/usr/local/lib/ruby/site_ruby/2.3/pkgtools/portsdb.rb:490:in `rescue in open_db': database file error (PortsDB::DBError)
   from /usr/local/lib/ruby/site_ruby/2.3/pkgtools/portsdb.rb:442:in `open_db'
   from /usr/local/lib/ruby/site_ruby/2.3/pkgtools/portsdb.rb:658:in `port'
   from /usr/local/lib/ruby/site_ruby/2.3/pkgtools/portsdb.rb:846:in `all_depends_list'
   from /usr/local/lib/ruby/site_ruby/2.3/pkgtools/pkgdb.rb:1016:in `block in tsort_build'
   from /usr/local/lib/ruby/site_ruby/2.3/pkgtools/pkgdb.rb:1001:in `each'
   from /usr/local/lib/ruby/site_ruby/2.3/pkgtools/pkgdb.rb:1001:in `tsort_build'
   from /usr/local/lib/ruby/site_ruby/2.3/pkgtools/pkgdb.rb:1030:in `sort_build'
   from /usr/local/lib/ruby/site_ruby/2.3/pkgtools/pkgdb.rb:1034:in `sort_build!'
   from /usr/local/sbin/portupgrade:825:in `block in main'
   from /usr/local/lib/ruby/2.3/optparse.rb:1062:in `initialize'
   from /usr/local/sbin/portupgrade:238:in `new'
   from /usr/local/sbin/portupgrade:238:in `main'
   from /usr/local/sbin/portupgrade:2380:in `<main>'
Can you help me to rescue the portuprade system?
 
This is one of the reasons why I stopped using ports-mgmt/portupgrade a long time ago. Those databases are so easy to corrupt.

Hopefully this fixes it: rm /usr/ports/INDEX-10.db and pkgdb -uf
 
Well, I do not have /usr/ports/INDEX-10.db and pkgdb -uf doesn't create it. And the problem persists.
 
Back
Top