# VirtualBox-ose failing to upgrade



## adripillo (Mar 26, 2013)

Hello, I am trying to update virtualbox-ose but I recive this error:


```
# portmaster emulators/virtualbox-ose

===>>> Currently installed version: virtualbox-ose-4.1.22
===>>> Port directory: /usr/ports/emulators/virtualbox-ose

===>>> Gathering distinfo list for installed ports

===>>> Launching 'make checksum' for emulators/virtualbox-ose in background
===>>> Gathering dependency list for emulators/virtualbox-ose from ports

===>>> The dependency for devel/kBuild
       seems to be handled by kBuild-devel-0.1.9998


===>>> The devel/kBuild-devel port has been deleted: Not required anymore; use devel/kBuild instead
===>>> Aborting update

Terminated
```


Any idea of how to fix it?


----------



## wblock@ (Mar 26, 2013)

Did you check /usr/ports/UPDATING, as should always be done before updating ports?  Specifically, entry 20130103.


----------



## adripillo (Mar 26, 2013)

wblock@ said:
			
		

> Did you check /usr/ports/UPDATING, as should always be done before updating ports?  Specifically, entry 20130103.



To be honest, nope, I did not.


----------



## adripillo (Mar 26, 2013)

I did it now, but I google about the error before and found that solution:


```
# pkg_delete -f kBuild-\*
kg_delete: no such package 'kBuild-*' installed
```


----------



## wblock@ (Mar 26, 2013)

Now retry updating VirtualBox.  If you have not been following UPDATING, there may be other problems.


----------



## adripillo (Mar 27, 2013)

wblock@ said:
			
		

> Now retry updating VirtualBox.  If you have not been following UPDATING, there may be other problems.




```
# portmaster emulators/virtualbox-ose

===>>> Currently installed version: virtualbox-ose-4.1.22
===>>> Port directory: /usr/ports/emulators/virtualbox-ose

===>>> Gathering distinfo list for installed ports

===>>> Launching 'make checksum' for emulators/virtualbox-ose in background
===>>> Gathering dependency list for emulators/virtualbox-ose from ports

===>>> The dependency for devel/kBuild
       seems to be handled by kBuild-devel-0.1.9998


===>>> The devel/kBuild-devel port has been deleted: Not required anymore; use devel/kBuild instead
===>>> Aborting update

Terminated
```


----------



## fonz (Mar 27, 2013)

adripillo said:
			
		

> ```
> ===>>> The dependency for devel/kBuild
> seems to be handled by kBuild-devel-0.1.9998
> 
> ...


The port devel/kBuild-devel appears to no longer be in the ports tree. According to /usr/ports/UPDATING it should be sufficient to simply `# pkg_delete -f kBuild-\*` and try again.


----------



## adripillo (Mar 27, 2013)

fonz said:
			
		

> The port devel/kBuild-devel appears to no longer be in the ports tree. According to /usr/ports/UPDATING it should be sufficient to simply `# pkg_delete -f kBuild-\*` and try again.



I already tried but there is nothing to be deleted


```
# pkg_delete -f kBuild-\*
pkg_delete: no such package 'kBuild-*' installed
```


----------



## cpm@ (Mar 27, 2013)

adripillo said:
			
		

> I already tried but there is nothing to be deleted
> 
> 
> ```
> ...



Please, show output `% pkg_info -Ix kBuild`


----------



## SirDice (Mar 27, 2013)

Are you using pkgng perhaps? In that case it's `# pkg delete -f kBuild`


----------



## adripillo (Mar 27, 2013)

cpu82 said:
			
		

> Please, show output `% pkg_info -Ix kBuild`




```
# pkg_info -Ix kBuild
pkg_info: no packages match pattern(s)
```


----------



## adripillo (Mar 27, 2013)

SirDice said:
			
		

> Are you using pkgng perhaps? In that case it's `# pkg delete -f kBuild`




```
# pkg delete -f kBuild
Package(s) not found!
# pkg_delete -f kBuild
pkg_delete: no such package 'kBuild' installed
```


----------



## cpm@ (Mar 27, 2013)

Try `# pkg_delete -f kBuild-devel-0.1.9998`


----------



## adripillo (Mar 27, 2013)

cpu82 said:
			
		

> Try `# pkg_delete -f kBuild-devel-0.1.9998`




```
# pkg_delete -f kBuild-devel-0.1.9998
pkg_delete: no such package 'kBuild-devel-0.1.9998' installed
```

Nope...


----------



## SirDice (Mar 27, 2013)

What's the output of `# ls -l /usr/local/bin/kmk*`?

If they're still around the removal of the package hasn't been completely successful.

Also, `# pkg_info -W /usr/local/bin/kmk` might tell us if some other package installed those binaries.


----------



## adripillo (Mar 27, 2013)

SirDice said:
			
		

> What's the output of `# ls -l /usr/local/bin/kmk*`?
> 
> If they're still around the removal of the package hasn't been completely successful.
> 
> Also, `# pkg_info -W /usr/local/bin/kmk` might tell us if some other package installed those binaries.



Here the output


```
# ls -l /usr/local/bin/kmk*
-r-xr-xr-x  1 root  wheel  619720 Dec 18 14:00 /usr/local/bin/kmk
-r-xr-xr-x  1 root  wheel    9816 Dec 18 14:00 /usr/local/bin/kmk_append
-r-xr-xr-x  1 root  wheel  201936 Dec 18 14:00 /usr/local/bin/kmk_ash
-r-xr-xr-x  1 root  wheel   17840 Dec 18 14:00 /usr/local/bin/kmk_cat
-r-xr-xr-x  1 root  wheel   26992 Dec 18 14:00 /usr/local/bin/kmk_chmod
-r-xr-xr-x  1 root  wheel   18432 Dec 18 14:00 /usr/local/bin/kmk_cmp
-r-xr-xr-x  1 root  wheel   42112 Dec 18 14:00 /usr/local/bin/kmk_cp
-r-xr-xr-x  1 root  wheel    5776 Dec 18 14:00 /usr/local/bin/kmk_echo
-r-xr-xr-x  1 root  wheel   16280 Dec 18 14:00 /usr/local/bin/kmk_expr
-r-xr-xr-x  1 root  wheel  192392 Dec 18 14:00 /usr/local/bin/kmk_gmake
-r-xr-xr-x  1 root  wheel   28824 Dec 18 14:00 /usr/local/bin/kmk_install
-r-xr-xr-x  1 root  wheel   15688 Dec 18 14:00 /usr/local/bin/kmk_ln
-r-xr-xr-x  1 root  wheel   17864 Dec 18 14:00 /usr/local/bin/kmk_md5sum
-r-xr-xr-x  1 root  wheel   18168 Dec 18 14:00 /usr/local/bin/kmk_mkdir
-r-xr-xr-x  1 root  wheel   16280 Dec 18 14:00 /usr/local/bin/kmk_mv
-r-xr-xr-x  1 root  wheel   22592 Dec 18 14:00 /usr/local/bin/kmk_printf
-r-xr-xr-x  1 root  wheel   11488 Dec 18 14:00 /usr/local/bin/kmk_redirect
-r-xr-xr-x  1 root  wheel   32856 Dec 18 14:00 /usr/local/bin/kmk_rm
-r-xr-xr-x  1 root  wheel   13768 Dec 18 14:00 /usr/local/bin/kmk_rmdir
-r-xr-xr-x  1 root  wheel  173856 Dec 18 14:00 /usr/local/bin/kmk_sed
-r-xr-xr-x  1 root  wheel    7824 Dec 18 14:00 /usr/local/bin/kmk_sleep
-r-xr-xr-x  1 root  wheel   17760 Dec 18 14:00 /usr/local/bin/kmk_test
-r-xr-xr-x  1 root  wheel    9344 Dec 18 14:00 /usr/local/bin/kmk_time
```


----------



## SirDice (Mar 27, 2013)

And `# pkg_info -W /usr/local/bin/kmk`?


----------



## adripillo (Mar 27, 2013)

SirDice said:
			
		

> And `# pkg_info -W /usr/local/bin/kmk`?




```
# pkg_info -W /usr/local/bin/kmk
pkg_info: /var/db/pkg/pkg-1.0.9_2/+CONTENTS: No such file or directory
```


----------



## SirDice (Mar 27, 2013)

I have a feeling your package information is highly corrupt. Which is probably why the binaries are still around and the system can't find the package info for it.


----------



## adripillo (Mar 27, 2013)

SirDice said:
			
		

> I have a feeling your package information is highly corrupt. Which is probably why the binaries are still around and the system can't find the package info for it.



Is there any way to delete it and get the correct one? or maybe some way to fix it?.


----------



## SirDice (Mar 27, 2013)

Tricky to fix. You could look at the directory names in /var/db/pkg/, each directory is a port/package that's installed. The only way I could think of to fix it is to reinstall all of them, or at least the ones that are corrupted.


----------



## adripillo (Mar 27, 2013)

SirDice said:
			
		

> Tricky to fix. You could look at the directory names in /var/db/pkg/, each directory is a port/package that's installed. The only way I could think of to fix it is to reinstall all of them, or at least the ones that are corrupted.




Only files inside /var/db/pkg/ are


```
# ls
auditfile       local.sqlite    pkg-1.0.9_2     pkgdb.db        repo.sqlite
```

And inside of pkg-1.0.9_2 this


```
# ls
distfiles
```


----------



## SirDice (Mar 27, 2013)

Ok, in that case, you're using pkgng. The /var/db/pkg/pkg-1.0.9_2 directory is probably a leftover, just remove it.

Since you're using pkgng we need to use a different command:
`# pkg which /usr/local/bin/kmk`


----------



## cpm@ (Mar 27, 2013)

You can try upgrade, just run `# portmaster -o devel/kBuild devel/kBuild-devel`


----------



## adripillo (Mar 27, 2013)

SirDice said:
			
		

> Ok, in that case, you're using pkgng. The /var/db/pkg/pkg-1.0.9_2 directory is probably a leftover, just remove it.
> 
> Since you're using pkgng we need to use a different command:
> `# pkg which /usr/local/bin/kmk`



Ok, so here it is


```
# pkg which /usr/local/bin/kmk
/usr/local/bin/kmk was installed by package kBuild-devel-0.1.9998
```


----------



## SirDice (Mar 27, 2013)

Now we're getting somewhere :e

`# pkg delete -f kBuild-devel` 

That should remove it.


----------



## adripillo (Mar 27, 2013)

cpu82 said:
			
		

> You can try upgrade, just run `# portmaster -o devel/kBuild devel/kBuild-devel`



This worked fine, now portmaster started to install virtualbox-ose but fails when try to install converters/libiconv:


```
Stop in /usr/ports/converters/libiconv.

===>>> A backup package for libiconv-1.14 should
       be located in /usr/ports/packages/portmaster-backup

===>>> Installation of libiconv-1.14_1 (converters/libiconv) failed
===>>> Aborting update

===>>> Update for libiconv-1.14 failed
===>>> Aborting update
```


----------



## SirDice (Mar 27, 2013)

The actual error is probably a little before that. Please post the entire error, not just the last bit.


----------



## adripillo (Mar 27, 2013)

```
===>   Registering installation for libiconv-1.14_1
Installing libiconv-1.14_1...pkg: libiconv-1.14_1 conflicts with gettext-0.18.1.1 (installs files into the same place).  Problematic file: /usr/local/lib/charset.alias
*** [fake-pkg] Error code 70

Stop in /usr/ports/converters/libiconv.
*** [install] Error code 1

Stop in /usr/ports/converters/libiconv
```


----------



## adripillo (Mar 27, 2013)

Seems it has a conflicts with other application.


```
===>   Registering installation for libiconv-1.14_1
Installing libiconv-1.14_1...pkg: libiconv-1.14_1 conflicts with gettext-0.18.1.1 (installs files into the same place).  Problematic file: /usr/local/lib/charset.alias
*** [fake-pkg] Error code 70

Stop in /usr/ports/converters/libiconv.
*** [install] Error code 1

Stop in /usr/ports/converters/libiconv
```


----------



## SirDice (Mar 27, 2013)

Read /usr/ports/UPDATING:

```
20130316:
  AFFECTS: users of converters/libiconv and devel/gettext
  AUTHOR: bapt@FreeBSD.org

  libiconv now handles the lib/charset.alias file instead of devel/gettext.
  If you are using pkgng 'and' upgrading from source with portupgrade or
  portmaster, first delete gettext, upgrade libiconv, then reinstall gettext.

  # pkg delete -f devel/gettext
  # portmaster converters/libiconv devel/gettext
    or
  # pkg delete -f devel/gettext
  # portupgrade converters/libiconv devel/gettext
```


----------



## adripillo (Mar 27, 2013)

Problem is solved, once again thanks to all!!.


----------

