From owner-freebsd-questions@freebsd.org Wed May 30 16:30:36 2018 Return-Path: Delivered-To: freebsd-questions@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 5DDFFF7C507 for ; Wed, 30 May 2018 16:30:36 +0000 (UTC) (envelope-from a199e59c87e914e7b5fdb9459865d66e@zxas.fi) Received: from box.zxas.fi (box.zxas.fi [185.87.108.237]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D64366C45D for ; Wed, 30 May 2018 16:30:35 +0000 (UTC) (envelope-from a199e59c87e914e7b5fdb9459865d66e@zxas.fi) Received: from authenticated-user (box.zxas.fi [185.87.108.237]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by box.zxas.fi (Postfix) with ESMTPSA id 9318E1E0E5; Wed, 30 May 2018 19:21:23 +0300 (EEST) Received: from authenticated-user (box.zxas.fi [185.87.108.237]) by zero.my.domain (Postfix) with ESMTP id 6FB2833C39; Wed, 30 May 2018 19:21:20 +0300 (EEST) Received: from authenticated-user (box.zxas.fi [185.87.108.237]) by thunderbolt.my.domain (8.15.2/8.15.2) with ESMTPS id w4UGLIvS077340 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Wed, 30 May 2018 19:21:18 +0300 (EEST) (envelope-from ejk@thunderbolt.my.domain) Received: from authenticated-user (box.zxas.fi [185.87.108.237]) by thunderbolt.my.domain (8.15.2/8.15.2/Submit) id w4UGLIOM077339; Wed, 30 May 2018 19:21:18 +0300 (EEST) (envelope-from ejk) Date: Wed, 30 May 2018 19:21:18 +0300 From: Esa Karkkainen To: Bernt Hansson Cc: freebsd-questions@freebsd.org Subject: Re: Problems with upgrade. Message-ID: <20180530162118.GC11983@pp.htv.fi> Mail-Followup-To: Esa Karkkainen , Bernt Hansson , freebsd-questions@freebsd.org References: <78ec6723-1389-c1df-27ec-55f0c5b32775@opayq.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <78ec6723-1389-c1df-27ec-55f0c5b32775@opayq.com> X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 30 May 2018 16:30:36 -0000 On Wed, May 30, 2018 at 12:48:09PM +0200, Bernt Hansson wrote: > Hello list. Hello, > Upgrade like this 10.3R -> 11.1R -> rollback -> 10.4 > > Now there is issues with some libs like > > Shared object "libldns.so.5" not found, required by "host" > Shared object "libheimipcc.so.11" not found, required by "libkrb5.so.11" > > Probably others too. Tried to build from source but...... No. > > Should i download 10.4 source and build userland & kernel? That is one possiblity, but "make buildworld" might not run succesfully, it depends how badly the operating system has been broken. I'm assuming you've used freebsd-update to do the updates. Please try # freebsd-update IDS Below is the relevant part of freebsd-update usage. IDS -- Compare the system against an index of "known good" files. You can see the freebsd-update commads usage if you run "freebsd-update" without any arguments. That might help you all the incorrect files, because the IDS might be able to tell you what files are not "known good" in 10.4. You can get specific files from the distribution packages like this. 1. You can download base.txz for amd64 architecture from: ftp://ftp.freebsd.org/pub/FreeBSD/releases/amd64/10.4-RELEASE/ 2. This is how you can find the specific path to the incorrect files: # xz -dc base.txz|tar tvf - | egrep 'libldns.so.5|libheimipcc.so.11' lrwxr-xr-x 0 root wheel 0 Sep 29 2017 ./usr/lib/private/libheimipcc.so -> libheimipcc.so.11 -r--r--r-- 0 root wheel 375976 Sep 29 2017 ./usr/lib/private/libldns.so.5 lrwxr-xr-x 0 root wheel 0 Sep 29 2017 ./usr/lib/private/libldns.so -> libldns.so.5 -r--r--r-- 0 root wheel 10032 Sep 29 2017 ./usr/lib/private/libheimipcc.so.11 The lines which begin with "l" character are just symbolic links, the lines that start with "-" character show the actual files that do not work. You can use "|egrep -v '^l'" at the end of the previous command to exclude any symbolic links, so the command would be xz -dc base.txz|tar tvf - | egrep 'libldns.so.5|libheimipcc.so.11' | egrep -v '^l' 3. Copy or download the base.txz file to /tmp directory 4. Extract the files needed: # cd /tmp/ # xz -dc /path/to/base.txz|tar xvf - ./usr/lib/private/libldns.so.5 ./usr/lib/private/libheimipcc.so.11 x ./usr/lib/private/libldns.so.5 x ./usr/lib/private/libheimipcc.so.11 5. So the two shared libraries are now in /tmp/usr/lib/private directory, now lets rename the incorrect files and copy these shared libraries to the correct directory: # mv -i /usr/lib/private/libldns.so.5 /usr/lib/private/libldns.so.5.broken && cp -pi /tmp/usr/lib/private/ibldns.so.5 /usr/lib/private/libldns.so.5 The "cp" comand will be run only if the "mv" command was successful and if the target file exist it will ask you "are you sure" You can't always overwrite files, because the file might be in use, so the safest way is to rename the file to a diffrent name and then copy the file to the same exact location. And that will not work on all files, for example "/usr/lib/libc.a" file unless you use statically linked commands from /rescue directory, but since you can run basically any command then the libc.a file is ok. You can do that by adding "/rescue" as the first diretory in your shells path environment variable. This is how you add "/rescue" temporarily as the first directory of the path using root users default shell, which is csh. # echo $SHELL /bin/csh # which mv /bin/mv # echo $path /sbin /bin /usr/sbin /usr/bin /usr/local/sbin /usr/local/bin /root/bin # set path = ( /rescue $path ) # echo $path /rescue /sbin /bin /usr/sbin /usr/bin /usr/local/sbin /usr/local/bin /root/bin # which mv /rescue/mv # If that doesn't help, please try this before running "freebsd-update" again. # cd /var/db # mv freebsd-update freebsd-update.not_in_use # mkdir freebsd-update # chown root:wheel freebsd-update # chmod 0700 freebsd-update # cp -pi freebsd-update.not_in_use/pub.ssl freebsd-update That makes freebsd-update lose all history, so it'll start from a clean slate. The you can run: # freebsd-update IDS or possibly: # freebsd-update fetch # freebsd-update install Hope that helps. Kind regards, Esa -- "In the beginning the Universe was created. This has made a lot of people very angry and been widely regarded as a bad move." -- Douglas Adams 1952 - 2001