# Can't run "mc"



## Demontager (Dec 30, 2012)

I switched from php 5.4 to php 5.3, then i tried to run mc and found this:

```
#mc Shared object "libpcre.so.0" not found, required by "libglib-2.0.so.0"
```
Currently i got pcre-8.32  installed, tried to reinstall it - not helped. Then performed

```
portmaster -r pcre
```
it reinstalled all depended packages, but unfortunately didn't resolve problem.

```
ldd /usr/local/bin/mc
/usr/local/bin/mc:
	libslang.so.2 => /usr/local/lib/libslang.so.2 (0x28173000)
	libncurses.so.8 => /lib/libncurses.so.8 (0x28278000)
	libglib-2.0.so.0 => /usr/local/lib/libglib-2.0.so.0 (0x282b8000)
	libintl.so.9 => /usr/local/lib/libintl.so.9 (0x2838b000)
	libiconv.so.3 => /usr/local/lib/libiconv.so.3 (0x28394000)
	libpcre.so.3 => /usr/local/lib/libpcre.so.3 (0x2848c000)
	libthr.so.3 => /lib/libthr.so.3 (0x284ec000)
	libc.so.7 => /lib/libc.so.7 (0x2850d000)
	libm.so.5 => /lib/libm.so.5 (0x28635000)
	libpcre.so.0 => not found (0)
```


----------



## cpm@ (Dec 30, 2012)

Please, read this thread for solution (pay attention at comment #2).


----------



## Demontager (Dec 31, 2012)

I may say problem *resolved*, but in unusual way.
 I followed given topic and tried to remove all pcre packages first, then installed binary 8.20, then run 

```
portmaster -r pcre
```
and it updated pcre to 8.32, tried to run mc - failed with same error as before.
I manually created symlink, but not of libpcre.so.1 and libpcre.so.3, as *.1 gave no effect. 

```
cd /usr/local/lib && ln -s libpcre.so.3 libpcre.so.0
```
Now mc runs at works.


----------



## wblock@ (Dec 31, 2012)

You still have software depending on that old library.  Faking it with a symlink pretty much guarantees problems in the future.  Please, just rebuild the software that depends on it and remove that symlink.


----------



## fonz (Dec 31, 2012)

Symlinking shared library files is pretty much a last-ditch method and often indicative of bad dependency management. There are occasionally reasons for doing this, but it is likely to blow up in your face sooner or later.

Fonz


----------



## Demontager (Dec 31, 2012)

Yeah, I know. Before i tried to do so, assume i missed something. Deleted symlink and still fighting with as i have not production server and may experement even brake everything.


----------



## kpa (Jan 1, 2013)

The portmaster -r pcre may miss some of the ports that depend on devel/pcre, ports-mgmt/portmaster is a good tool but it can't detect the reverse dependencies if the port revisions of the dependent ports have not been bumped. You'll have to recompile misc/mc yourself after updating the devel/pcre port:

`# portmaster misc/mc`


----------

