From owner-freebsd-questions@FreeBSD.ORG Mon Jul 12 08:16:04 2004 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 8F4E316A4CE for ; Mon, 12 Jul 2004 08:16:04 +0000 (GMT) Received: from smtp.infracaninophile.co.uk (smtp.infracaninophile.co.uk [81.2.69.218]) by mx1.FreeBSD.org (Postfix) with ESMTP id 57E1543D2F for ; Mon, 12 Jul 2004 08:16:03 +0000 (GMT) (envelope-from m.seaman@infracaninophile.co.uk) Received: from happy-idiot-talk.infracaninophile.co.uk (localhost [IPv6:::1]) i6C8Fr1t092637 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Mon, 12 Jul 2004 09:15:53 +0100 (BST) (envelope-from matthew@happy-idiot-talk.infracaninophile.co.uk) Received: (from matthew@localhost)id i6C8Fpj7092636; Mon, 12 Jul 2004 09:15:51 +0100 (BST) (envelope-from matthew) Date: Mon, 12 Jul 2004 09:15:51 +0100 From: Matthew Seaman To: Dan Nelson Message-ID: <20040712081551.GA92187@happy-idiot-talk.infracaninophile.co.uk> Mail-Followup-To: Matthew Seaman , Dan Nelson , Miguel Cardenas , freebsd-questions@freebsd.org References: <200407111647.44006.mfcardenas@prodigy.net.mx> <20040711215427.GE95931@dan.emsphone.com> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="XsQoSWH+UP9D9v3l" Content-Disposition: inline In-Reply-To: <20040711215427.GE95931@dan.emsphone.com> User-Agent: Mutt/1.5.6i X-Greylist: Message not sent from an IPv4 address, not delayed by milter-greylist-1.5.3 (smtp.infracaninophile.co.uk [0.0.0.0]); Mon, 12 Jul 2004 09:15:53 +0100 (BST) X-Virus-Scanned: clamd / ClamAV version devel-20040705, clamav-milter version 0.74a on smtp.infracaninophile.co.uk X-Virus-Status: Clean X-Spam-Status: No, hits=-4.8 required=5.0 tests=AWL,BAYES_00 autolearn=ham version=2.63 X-Spam-Checker-Version: SpamAssassin 2.63 (2004-01-11) on happy-idiot-talk.infracaninophile.co.uk cc: Miguel Cardenas cc: freebsd-questions@freebsd.org Subject: Re: PATH var and more... X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 12 Jul 2004 08:16:04 -0000 --XsQoSWH+UP9D9v3l Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sun, Jul 11, 2004 at 04:54:27PM -0500, Dan Nelson wrote: > In the last episode (Jul 11), Miguel Cardenas said: > > I've installed MySQL 4.0.20 successfully from source code and > > programs work fine, but have still two little "problems"... > >=20 > > 1. Can't add /usr/local/mysql/bin to the PATH var from the main=20 > > configuration... Tried to add: > > export PATH=3D$PATH:/usr/local/mysql/bin to /etc/profile, but didn't > > work. It only works if I send the command through the bash shell or > > in $HOME/.profile but /etc/profile does not work... why? don't want > > to append it to the .profile of each user!!! >=20 > Add some echos to /etc/profile to make sure it's really being executed, > maybe. Modifying the default path setting in /etc/login.conf works well, and applies to all shells. Remember to run 'cap_mkdb /etc/login.conf' after your edits. =20 > > 2. MySQL is working fine now, but now that am creating/porting a > > client application, once compiled it does not find > > libmysqlclient.so... tried to append the path to /etc/ld.so.conf and > > ld-elf.so.conf and run ldconfig, but still not found by system when > > invoking a program that uses it... how can I add /usr/local/mysql/lib > > to the libraries path? >=20 > Edit /etc/rc.conf and add your path to ldconfig_paths, or create a > small startup script to put in /usr/local/etc/rc.d with the command > "ldconfig -m /usr/local/wherever_libmysqlclient.so_is". /etc/ld.so.conf > is a Linuxism. >=20 > Or solve both of your problems at once by removing /usr/local/mysql and > installing the /usr/ports/databases/mysql40-client and mysql40-server > ports :) That just moves the mysql shlibs from /usr/local/mysql/lib to /usr/local/lib/mysql -- the mysqlXX-client port will install /usr/local/etc/rc.d/000.mysql-client.sh to add /usr/local/lib/mysql to the search path for shlibs automatically. However that can be run too late in the startup sequence for some purposes. In that case, you can use the 'ldconfig_paths' variable in /etc/rc.conf: ldconfig_paths=3D"/usr/lib/compat /usr/X11R6/lib /usr/local/lib /usr/lo= cal/lib/mysql" Cheers, Matthew --=20 Dr Matthew J Seaman MA, D.Phil. 26 The Paddocks Savill Way PGP: http://www.infracaninophile.co.uk/pgpkey Marlow Tel: +44 1628 476614 Bucks., SL7 1TH UK --XsQoSWH+UP9D9v3l Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.4 (FreeBSD) iD8DBQFA8ki3iD657aJF7eIRAomhAKCR2wSTn7TCjCAk7WmBinyrFJ+brwCfYJwE tjUtiYPlOP0drtXHVFYEgYA= =dwNQ -----END PGP SIGNATURE----- --XsQoSWH+UP9D9v3l--