From owner-freebsd-questions@FreeBSD.ORG Tue Mar 18 16:02:01 2014 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 0B3BCCEE for ; Tue, 18 Mar 2014 16:02:01 +0000 (UTC) Received: from bigb5.homeftp.net (k2-pc243.koz.uowm.gr [83.212.19.243]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 779DF78E for ; Tue, 18 Mar 2014 16:01:59 +0000 (UTC) Received: from bigb5.homeftp.net (localhost [127.0.0.1]) by bigb5.homeftp.net (8.14.7/8.14.7) with ESMTP id s2IFuI0o008878 for ; Tue, 18 Mar 2014 17:56:18 +0200 (EET) (envelope-from mdasyg@ieee.org) DKIM-Filter: OpenDKIM Filter v2.8.3 bigb5.homeftp.net s2IFuI0o008878 Authentication-Results: bigb5.homeftp.net; dkim=none reason="no signature"; dkim-adsp=none (unprotected policy) Received: (from mdasyg@localhost) by bigb5.homeftp.net (8.14.7/8.14.7/Submit) id s2IFuCxU008867 for freebsd-questions@freebsd.org; Tue, 18 Mar 2014 17:56:12 +0200 (EET) (envelope-from mdasyg@ieee.org) Date: Tue, 18 Mar 2014 17:56:12 +0200 From: Minas Dasygenis To: freebsd-questions@freebsd.org Subject: An admin script to check missing dependencies Message-ID: <20140318155612.GA84624@bigb5.homeftp.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.5.23 (2014-03-12) X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.4.3 (bigb5.homeftp.net [127.0.0.1]); Tue, 18 Mar 2014 17:56:18 +0200 (EET) X-Virus-Scanned: clamav-milter 0.98 at bigb5.homeftp.net X-Virus-Status: Clean X-Spam-Status: No, score=-1.0 required=5.0 tests=ALL_TRUSTED autolearn=ham version=3.3.2 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on bigb5.homeftp.net X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 18 Mar 2014 16:02:01 -0000 Greetings, While I administer a number of FreeBSD Servers, I have faced the problem of an application failing to start, due to a missing dynamic library dependency. Furthermore, if this application impacts the reputation of the server, then it is mandatory to fix it as soon as possible. The problem originates when I update a port [using portmaster], which installs a newer version of a library [e.g. removes the library.so.10 and installs library.so.11]. In such cases, applications that demand the old library stop working. Usually an "ln -s library.so.11 library.so.10" fixes the problem, but this means that an early detection is required. To help myself [and other freebsd administrators], I have created a script that I execute it daily. This script checks all files on the system. If it finds a missing dependency it reports it to the user, as well as a possible fix if this is available. This script is available at my home page at the miscellaneous section: http://arch.icte.uowm.gr/mdasyg/misc/check_requisite_library_files.sh I am executing it on every FreeBSD server and whenever a missing library is found I am notified via email. Feel free to contribute any improvements via email and I will update it. Rgz, MD --- Dr. Minas Dasygenis http://arch.icte.uowm.gr/mdasyg