# pkg upgrade error



## antolap (Apr 7, 2016)

I get this error, please help me understand what's the cause, thanks!


```
Updating FreeBSD repository catalogue...
FreeBSD repository is up-to-date.
All repositories are up-to-date.
Checking for upgrades (151 candidates): .......... done
Processing candidates (151 candidates): .......... done
Checking integrity...
Assertion failed: (strcmp(uid, p->uid) != 0), function pkg_conflicts_check_local_path, file pkg_jobs_conflicts.c, line 387.
Child process pid=762 terminated abnormally: Abort trap
```


----------



## cpm@ (Apr 7, 2016)

Try `pkg update -f` and see if it solves your problem.


----------



## antolap (Apr 7, 2016)

I get the same same error.

What else to do?


----------



## cpm@ (Apr 7, 2016)

Please try `pkg update -f` before `pkg upgrade`

Also, be sure that you have installed the latest pkg(8) release

```
% pkg -v
1.7.2
```


----------



## antolap (Apr 7, 2016)

yes 1.7.2

and I still get the error with 
	
	



```
pkg upgrade -f
```
 or 
	
	



```
pkg upgrade
```

help me!


----------



## Maxnix (Apr 7, 2016)

Seems that is a bug. Look at this discussion:
http://lists.freebsd.org/pipermail/freebsd-pkg/2014-December/000850.html
and the bug report:
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=195961


----------



## cpm@ (Apr 7, 2016)

Raise your issue in the PR 195961 to avoid duplicate this bug.


----------



## Maxnix (Apr 8, 2016)

A possible workaround came in mind (but don't know if works):
you can try updating with `pkg install`.

When you try to install an already installed package, pkg will answer

```
The most recent version of packages are already installed
```
if there is not a new version, instead will give you the possibility to upgrade if there is a newer one.

To do so, get a list of packages that are not dependecies of others, and pass that list to `pkg install`.
`pkg install `pkg query -e '%#r = 0' %o | cut -f2 -d \/``.


----------

