# portupgrade output - interpretation



## jaymax (Aug 12, 2012)

Hello,

Doing a new installation of FreeBSD 9.0-RELEASE #0, with Ports installation, followed by a 'portupgrade'. Was served with the following -

```
# portupgrade -afu
[Updating the pkgdb <format:bdb_btree> in /var/db/pkg ... - 609 packages found (-0 +351) ....................................................................................................100....................................................................................................200....................................................................................................300................................................... done]
[missing key: virtual_categories] [Updating the portsdb <format:bdb_btree> in /usr/ports ... - 0 port entries found  ..... done]
missing key: virtual_categories: Cannot read the portsdb!
database file error
** Port directory not found: sysutils/automount
[missing key: virtual_categories] [Updating the portsdb <format:bdb_btree> in /usr/ports ... - 0 port entries found  ..... done]
missing key: virtual_categories: Cannot read the portsdb!
/usr/local/lib/ruby/site_ruby/1.8/portsdb.rb:491:in `open_db': database file error (PortsDB::DBError)
        from /usr/local/lib/ruby/site_ruby/1.8/portsdb.rb:659:in `port'
        from /usr/local/lib/ruby/site_ruby/1.8/portsdb.rb:847:in `all_depends_list'
        from /usr/local/lib/ruby/site_ruby/1.8/pkgdb.rb:843:in `tsort_build'
        from /usr/local/lib/ruby/site_ruby/1.8/pkgdb.rb:835:in `each'
        from /usr/local/lib/ruby/site_ruby/1.8/pkgdb.rb:835:in `tsort_build'
        from /usr/local/lib/ruby/site_ruby/1.8/pkgdb.rb:857:in `sort_build'
        from /usr/local/lib/ruby/site_ruby/1.8/pkgdb.rb:861:in `sort_build!'
        from /usr/local/sbin/portupgrade:790:in `main'
        from /usr/local/lib/ruby/1.8/optparse.rb:791:in `initialize'
        from /usr/local/sbin/portupgrade:231:in `new'
        from /usr/local/sbin/portupgrade:231:in `main'
        from /usr/local/sbin/portupgrade:2219
```
Not too sure how to interpret all, especially  
references to "missing key: virtual_categories"; "database file error"

Some clarification would be helpful.

Thanks!


----------



## setevoy (Aug 13, 2012)

I have the same problem some time ago. As I remember I just perform update ports collection:


```
portsnap fetch update
```


```
pkgdb -fu
```


----------



## setevoy (Aug 14, 2012)

Hi, *jaymax*, did you find solution?


----------



## jaymax (Aug 14, 2012)

Nope: I took your advice, used 
	portsnap -extract	#> Rebuilds complete Ports Tree
	portsnap -fetch	#> Fetches Ports collection
	portsnap -update	#> Upgrades Tree built w/ -extract, and fetched
That seem to have done, still have to check if it was complete.

Thanks!


----------

