From owner-freebsd-questions@FreeBSD.ORG Tue Mar 17 23:32:09 2009 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B54E2106564A for ; Tue, 17 Mar 2009 23:32:09 +0000 (UTC) (envelope-from freebsd@edvax.de) Received: from mx02.qsc.de (mx02.qsc.de [213.148.130.14]) by mx1.freebsd.org (Postfix) with ESMTP id 4AB3F8FC12 for ; Tue, 17 Mar 2009 23:32:09 +0000 (UTC) (envelope-from freebsd@edvax.de) Received: from r55.edvax.de (port-92-196-27-90.dynamic.qsc.de [92.196.27.90]) by mx02.qsc.de (Postfix) with ESMTP id D232319B7FE7; Wed, 18 Mar 2009 00:32:07 +0100 (CET) Received: from r55.edvax.de (localhost [127.0.0.1]) by r55.edvax.de (8.14.2/8.14.2) with SMTP id n2HNW2K5001741; Wed, 18 Mar 2009 00:32:02 +0100 (CET) (envelope-from freebsd@edvax.de) Date: Wed, 18 Mar 2009 00:32:01 +0100 From: Polytropon To: "marco.borsatino@libero.it" Message-Id: <20090318003201.f03ddc8b.freebsd@edvax.de> In-Reply-To: <13060403.254531237231322879.JavaMail.defaultUser@defaultHost> References: <13060403.254531237231322879.JavaMail.defaultUser@defaultHost> Organization: EDVAX X-Mailer: Sylpheed 2.4.7 (GTK+ 2.12.1; i386-portbld-freebsd7.0) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Cc: freebsd-questions@freebsd.org Subject: Re: installing packages X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Polytropon List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 17 Mar 2009 23:32:10 -0000 On Mon, 16 Mar 2009 20:22:02 +0100 (CET), "marco.borsatino@libero.it" wrote: > > Hi, this are my questions. > > 1) I've installed many packages using pkg_add -rK [package] because > I had the idea to use the same packages on a different PC. Packages > are present in the directory i used as a repository, but only the > requested packages, not the dependecies. > > When I tried on another PC pkg_add [package] (I've copied all the > requested packages on a USB HD) the program tells me that it cannot > find dependencies. What is my mistake? As it has already been suggested, it may be that you missed some dependencies. I'll equip you with my (dirtily hacked) pkg_download script so you can be sure to have all the dependencies. You can delete the -n option if you wish to download AND install the packages. The default behaviour is to fetch them only. (Original intention: Download package and dependencies on system A with Internet access, copy the result to system B without Internet access, and then install them there.) #!/bin/sh # # pkg_download.sh # =============== # # fetch a precompiled package as well as its dependencies # for further installation # # Written 2008-08-19 if [ "$1" = "" ]; then echo "$0 " exit 1 fi echo -n "fetching $1 ... " if [ -f $1.tbz ]; then echo "$1.tbz already there" exit 1 fi pkg_add -fKnrv $1 > $1.txt 2>&1 # -f = force, -K = keep, -n = no install, -r = remote, -v = verbose echo "done" for DEP in `cat $1.txt | grep $1 | grep "depends on" | cut -d "'" -f 6 | cut -d "/" -f 2`; do echo "dependency for $1 is ${DEP}" $0 ${DEP} done rm $1.txt exit 0 -- Polytropon >From Magdeburg, Germany Happy FreeBSD user since 4.0 Andra moi ennepe, Mousa, ...