# Issues Installing Virtual Box



## Dead_Lemon (Apr 27, 2012)

Hey all

I'm rather new at FreeBSD, and I'm struggling to install Virtualbox, I'm getting these error


```
[root@server /usr/ports/emulators/virtualbox-ose]# make install clean
===>   virtualbox-ose-4.1.12 depends on executable: yasm - found
===>   virtualbox-ose-4.1.12 depends on executable: as86 - found
===>   virtualbox-ose-4.1.12 depends on executable: xsltproc - found
===>   virtualbox-ose-4.1.12 depends on executable: kmk - found
===>   virtualbox-ose-4.1.12 depends on executable: gtar - found
===>   virtualbox-ose-4.1.12 depends on file: /usr/local/bin/easy_install-2.7 - found
===>   virtualbox-ose-4.1.12 depends on file: /usr/local/bin/python2.7 - found
===>   virtualbox-ose-4.1.12 depends on file: /usr/local/libdata/pkgconfig/inputproto.pc - found
===>   virtualbox-ose-4.1.12 depends on file: /usr/local/libdata/pkgconfig/xcursor.pc - found
===>   virtualbox-ose-4.1.12 depends on file: /usr/local/libdata/pkgconfig/xmu.pc - found
===>   virtualbox-ose-4.1.12 depends on file: /usr/local/libdata/pkgconfig/xinerama.pc - found
===>   virtualbox-ose-4.1.12 depends on file: /usr/local/lib/qt4/libQtGui.so - not found
===>    Verifying install for /usr/local/lib/qt4/libQtGui.so in /usr/ports/x11-toolkits/qt4-gui
===>   qt4-gui-4.7.4_1 depends on file: /usr/local/libdata/pkgconfig/inputproto.pc - found
===>   qt4-gui-4.7.4_1 depends on file: /usr/local/libdata/pkgconfig/xrender.pc - found
===>   qt4-gui-4.7.4_1 depends on file: /usr/local/libdata/pkgconfig/xrandr.pc - found
===>   qt4-gui-4.7.4_1 depends on file: /usr/local/libdata/pkgconfig/xinerama.pc - found
===>   qt4-gui-4.7.4_1 depends on file: /usr/local/libdata/pkgconfig/xfixes.pc - found
===>   qt4-gui-4.7.4_1 depends on file: /usr/local/libdata/pkgconfig/sm.pc - found
===>   qt4-gui-4.7.4_1 depends on file: /usr/local/libdata/pkgconfig/xcursor.pc - found
===>   qt4-gui-4.7.4_1 depends on file: /usr/local/libdata/pkgconfig/xext.pc - found
===>   qt4-gui-4.7.4_1 depends on file: /usr/local/libdata/pkgconfig/x11.pc - found
===>   qt4-gui-4.7.4_1 depends on file: /usr/local/libdata/pkgconfig/ice.pc - found
===>   qt4-gui-4.7.4_1 depends on file: /usr/local/libdata/pkgconfig/xi.pc - found
===>   qt4-gui-4.7.4_1 depends on file: /usr/local/libdata/pkgconfig/xt.pc - found
===>   qt4-gui-4.7.4_1 depends on file: /usr/local/lib/qt4/libQtCore.so - not found
===>    Verifying install for /usr/local/lib/qt4/libQtCore.so in /usr/ports/devel/qt4-corelib
===>   qt4-corelib-4.7.4 depends on file: /usr/local/bin/moc-qt4 - found
===>   qt4-corelib-4.7.4 depends on file: /usr/local/bin/qmake-qt4 - found
===>   qt4-corelib-4.7.4 depends on shared library: glib-2.0 - not found
===>    Verifying install for glib-2.0 in /usr/ports/devel/glib20
===>   glib-2.28.8_4 depends on file: /usr/local/bin/python2.7 - found
===>   glib-2.28.8_4 depends on executable: gmake - found
===>   glib-2.28.8_4 depends on file: /usr/local/bin/perl5.12.4 - found
===>   glib-2.28.8_4 depends on package: libtool>=2.4 - found
===>   glib-2.28.8_4 depends on executable: pkg-config - found
===>   glib-2.28.8_4 depends on shared library: pcre.1 - not found
===>    Verifying install for pcre.1 in /usr/ports/devel/pcre
===>  Installing for pcre-8.30_1
===>   Generating temporary packing list
===>  Checking if devel/pcre already installed
===>   An older version of devel/pcre is already installed (pcre-8.20)
      You may wish to ``make deinstall'' and install this port again
      by ``make reinstall'' to upgrade it properly.
      If you really wish to overwrite the old port of devel/pcre
      without deleting it first, set the variable "FORCE_PKG_REGISTER"
      in your environment or the "make install" command line.
*** Error code 1

Stop in /usr/ports/devel/pcre.
*** Error code 1

Stop in /usr/ports/devel/pcre.
*** Error code 1

Stop in /usr/ports/devel/glib20.
*** Error code 1

Stop in /usr/ports/devel/glib20.
*** Error code 1

Stop in /usr/ports/devel/qt4-corelib.
*** Error code 1

Stop in /usr/ports/x11-toolkits/qt4-gui.
*** Error code 1

Stop in /usr/ports/emulators/virtualbox-ose.
*** Error code 1
```

I hope some one can give insite into the issue

Thanks


----------



## jb_fvwm2 (Apr 27, 2012)

```
cd /usr/ports/devel/pcre
pkg_delete -f /var/db/pkg/pcre-{some number} && make install
```


----------



## Dead_Lemon (Apr 27, 2012)

I'm confused with the {Some number} part?

I only see:

```
[root@server /usr/ports/devel/pcre]# ls
Makefile        files           pkg-plist
distinfo        pkg-descr       work
```


----------



## AlexN (Apr 27, 2012)

```
cd /usr/ports/devel/pcre
make deinstall
make reinstall
```


----------



## wblock@ (Apr 27, 2012)

An old version of devel/pcre is installed, and must be upgraded before installing VirtualBox.  But note that after upgrading pcre, you should rebuild everything that needs it.  See 20120214 in /usr/ports/UPDATING.  Install sysutils/bsdadminscripts and run pkg_libchk to see all the ports that should be rebuilt.

Then, finally, install VirtualBox.


----------



## jb_fvwm2 (Apr 28, 2012)

Dead_Lemon said:
			
		

> I'm confused with the {Some number} part?
> 
> I only see:
> 
> ...




```
cd /var/db/pkg
ls -lac | grep pcre
```
 ... you would see the number. If you configure your shell some it may
expand the line automagically upon pressing [tab]...
another way...

```
cd /usr/ports/devel/pcre
make -V PKGNAME    # good command to make into an alias
```


----------



## Dead_Lemon (Apr 28, 2012)

Thanks all for the replies.



			
				AlexN said:
			
		

> ```
> cd /usr/ports/devel/pcre
> make deinstall
> make reinstall
> ```



This seemed to help.

But now I'm getting:

```
kmk: *** Waiting for unfinished jobs....
kmk: *** Exiting with status 2
*** Error code 2

Stop in /usr/ports/emulators/virtualbox-ose.
*** Error code 1

Stop in /usr/ports/emulators/virtualbox-ose.
```

Thanks jb_fvwm2 for clearing up those commands, still a little confused, but at least I'll know in the future when it is needed again.

wblock@, I'm so confused on exactly what I'm meant to do, I'm really new to this, thanks regardless.


----------



## wblock@ (Apr 28, 2012)

VirtualBox requires a newer version of devel/pcre than you had installed.  So the first step would be to update the ports tree, deinstall the old pcre, and install the new one.  But other programs may be using pcre, and might need to be rebuilt to use the new version.  Programs like ports-mgmt/portmaster automatically handle rebuilds like that, or try to.

pcre seems to be something of a problem, so I advise also installing sysutils/bsdadminscripts, which has a useful program called pkg_libchk(1).  pkg_libchk will look through all installed ports for missing library dependencies.  The programs it lists with missing libraries need to be rebuilt.

See Upgrading FreeBSD Ports for an overview of the whole process.


----------

