advert

Thursday, 18 March 2010

Shared object "libncursesw.so.6" not found

Shared object "libncursesw.so.6" not found

Introduction
This article describes how I resolved this issue in my box.

16 Mar. 2010
FreeBSD 6.4-STABLE version after an upgrade just appeared:
/libexec/ld-elf.so.1: Shared object "libncursesw.so.6" not found, required by "mysql"
Google was not helpful. So I am going to describe few steps how to fix that problem.
In nutshell the problem is missing C library when package was used (not ports).

Prerequisites:
We need use of newer version GCC and binutils with FreeBSD Ports Collection.
The base for FreeBSD 6.4 is gcc version 3.4.6
Obtaining information relating to the basic compiler information:
# gcc -v

Step 1
Make sure your ports are up to date:
# /usr/local/bin/cvsup -g -L 2 /path-to-your/standard-supfile OR # portsnap fetch update

Step 2
Installing binutils and GCC45 from ports:
# cd /usr/ports/devel/binutils && make install clean
# cd /usr/ports/lang/gcc45 && make install clean


Step 3
Configuring our Ports Collection for use of newer version GCC
Adjusting make.conf: # vi /etc/make.conf

Add the following lines to the /etc/make.conf file (or modify appropriately):
# 2010-03-15 ********* added P.M. ***************
# Configuring ports for custom version of GCC
.if !empty(.CURDIR:M/usr/ports/*) && exists(/usr/local/bin/gcc45)
# To exclude ports that have problems with custom version of GCC, example the net/openldap* and cyrus-auth ports
.if empty(.CURDIR:M/usr/ports/net/openldap*)&& empty(.CURDIR:M/usr/ports/security/cyrus-sasl2-saslauthd)
CC=gcc45
CXX=g++45
CPP=cpp45
# Custom CFLAGS for the ports tree.
# Compile with specific CPU-type-instruction (AMD Athlon) CFLAGS "SSE3" may increase performance 10%-20%
CFLAGS+=-msse3
.endif
.endif
# 2010-03-15 ********* added P.M. ***************


Step 4
Adjusting libmap.conf # vi /etc/libmap.conf
libgcc_s.so.1 gcc45/libgcc_s.so.1
libgomp.so.1 gcc45/libgomp.so.1
libobjc.so.3 gcc45/libobjc.so.2
libssp.so.0 gcc45/libssp.so.0
libstdc++.so.6 gcc45/libstdc++.so.6


References:
http://www.morpheushosting.sk/content/shared-object-libncurseswso6-not-found
http://www.freebsd.org/doc/en/articles/custom-gcc/article.html
http://gcc.gnu.org/onlinedocs/gcc-3.2/gcc/i386-and-x86-64-Options.html


Spread Firefox Affiliate Button

0 komentářů:

Post a comment