From owner-freebsd-questions Fri Jan 17 0:43:49 2003 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 B332E37B401 for ; Fri, 17 Jan 2003 00:43:47 -0800 (PST) Received: from smtp.infracaninophile.co.uk (happy-idiot-talk.infracaninophile.co.uk [81.2.69.218]) by mx1.FreeBSD.org (Postfix) with ESMTP id DCF4C43F5F for ; Fri, 17 Jan 2003 00:43:45 -0800 (PST) (envelope-from m.seaman@infracaninophile.co.uk) Received: from happy-idiot-talk.infracaninophile.co.uk (localhost [IPv6:::1]) by smtp.infracaninophile.co.uk (8.12.6/8.12.6) with ESMTP id h0H8hc84031671; Fri, 17 Jan 2003 08:43:38 GMT (envelope-from matthew@happy-idiot-talk.infracaninophile.co.uk) Received: (from matthew@localhost) by happy-idiot-talk.infracaninophile.co.uk (8.12.6/8.12.6/Submit) id h0H8hWVd031666; Fri, 17 Jan 2003 08:43:32 GMT Date: Fri, 17 Jan 2003 08:43:32 +0000 From: Matthew Seaman To: FreeBSD LIST Cc: Peter Leftwich Subject: Re: Manually reinstall various lib's? Message-ID: <20030117084332.GA31537@happy-idiot-talk.infracaninophi> Mail-Followup-To: Matthew Seaman , FreeBSD LIST , Peter Leftwich References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.3i X-Spam-Status: No, hits=-2.2 required=5.0 tests=IN_REP_TO,QUOTED_EMAIL_TEXT,REFERENCES,SPAM_PHRASE_05_08, USER_AGENT,USER_AGENT_MUTT version=2.43 Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG On Fri, Jan 17, 2003 at 03:23:54AM -0500, Peter Leftwich wrote: > > [PLEASE CC: ME IN YOUR REPLY - THANK YOU] > > I just upgraded from 4.6.2 to 4.7 after accidentally, yes, as root, wiping > out my /usr/local/bin/ folder with an "rm -rf" (I thought I was in > /somemounteddrive/usr/local/bin/ and was removing unneeded stuff)! > > I also removed /usr/local/lib/ by accident and now "startx" and lots of > different "pkg_add -rf package" commands are giving me errors about > expecting different libraries. Is there a way to manually install these? > > Please help, you're my only hope! =) Yours, faithfully as root right now, I assume from the desperate nature of this plea that you don't have good backups of all the stuff you accidentally deleted. Hmmm... Do you have portupgrade installed? Does it still work? If not, try re-installing it from packages from one of the ftp sites. You'll also need the packages it depends on: % pkg_info -r portupgrade\* Information for portupgrade-20021216: Depends on: Dependency: ruby-1.6.8 Dependency: ruby-shim-ruby18-1.8.0.p1 Dependency: ruby-bdb1-0.1.8 Then make sure your ports tree is up to date, and you've rebuilt the indexes and fixed up the package dependencies: # portsdb -Uu # pkgdb -Fv and then use portupgrade to force a reinstall of all previously installed packages: # portinstall -rRiaf This should work through all installed packages in dependency order, prompting you each time if you want to de-install and then re-install the package. If you'ld prefer to install pre-compiled packages rather than compile from ports, add 'P' to that list of flags. Cheers, Matthew -- 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 To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message