# portupgrade fails -- Unable to build portsdb



## magikman (Dec 1, 2011)

I recently upgraded from 7.2 to 8.2 and am now unable to use portupgrade to upgrade the installed packages. When running *portupgrade* I receive the following errors (or when running *portsdb -Uu*):

```
[Updating the portsdb <format:bdb_btree> in /usr/ports ... - 22891 port entries found  error] Remove and try again.
[Updating the portsdb <format:bdb_btree> in /usr/ports ... - 22891 port entries found  error] Remove and try again.
[Updating the portsdb <format:bdb_btree> in /usr/ports ... - 22891 port entries found  error] Remove and try again.
[Updating the portsdb <format:bdb_btree> in /usr/ports ... - 22891 port entries found  error] Remove and try again.
[Updating the portsdb <format:bdb_btree> in /usr/ports ... - 22891 port entries found  error] Remove and try again.
[Updating the portsdb <format:bdb_btree> in /usr/ports ... - 22891 port entries found  error] Remove and try again.
[Updating the portsdb <format:bdb_btree> in /usr/ports ... - 22891 port entries found  error] Remove and try again.
[Updating the portsdb <format:bdb_btree> in /usr/ports ... - 22891 port entries found  error] Remove and try again.
[Updating the portsdb <format:bdb_btree> in /usr/ports ... - 22891 port entries found  error] Remove and try again.
[Updating the portsdb <format:bdb_btree> in /usr/ports ... - 22891 port entries found  error] Remove and try again.
[Updating the portsdb <format:bdb_btree> in /usr/ports ... - 22891 port entries found  error] Remove and try again.
[Updating the portsdb <format:bdb_btree> in /usr/ports ... - 22891 port entries found  error] Remove and try again.
[Updating the portsdb <format:bdb_btree> in /usr/ports ... - 22891 port entries found  error] Remove and try again.
[Updating the portsdb <format:bdb_btree> in /usr/ports ... - 22891 port entries found  error] Remove and try again.
```

These errors continue to scroll. I have tried deleting the entire ports tree and using portsnap to rebuild it. I have tried removing the INDEX files and database files port pkgs and ports and rebuilding them -- still with the same results. Ideas?


Thanks!


----------



## magikman (Dec 1, 2011)

Fixed this by removing ruby and its dependencies and portupgrade and recompiling / reinstalling them all.


----------

