DaemonForums  

Go Back   DaemonForums > OpenBSD > OpenBSD Packages and Ports

OpenBSD Packages and Ports Installation and upgrading of packages and ports on OpenBSD.

Reply
 
Thread Tools Display Modes
  #1   (View Single Post)  
Old 25th January 2009
nihonto nihonto is offline
Fdisk Soldier
 
Join Date: May 2008
Posts: 65
Default pkg_add - can't resolve <packagename>

Hi there,

after a shot journey into the world of NetBSD I switched back to OpenBSD (for several reasons).

But now, after I reinstalled OpenBSD 4.4 I'm into a strange problem. I have added a PKG_PATH to my .profile (and logged out and in):

Quote:
# $OpenBSD: dot.profile,v 1.4 2005/02/16 06:56:57 matthieu Exp $
#
# sh/ksh initialization

PATH=$HOME/bin:/bin:/sbin:/usr/bin:/usr/sbin:/usr/X11R6/bin:/usr/local/bin:/usr/
local/sbin:/usr/games:.
export PATH HOME TERM

export PS1='$PWD $ '

export PKG_PATH=ftp://ftp.freenet.de/pub/ftp.openbsd.org/pub/OpenBSD/4.4/packages/i386/
But when I try to install a package with pkg_add I just get:

Quote:
# pkg_add -i fluxbox
Can't resolve fluxbox
To be sure that ksh reads my .profile I added this (following FAQ 8.16):

Quote:
$ echo "XTerm*loginShell: true" >> ~/.Xdefaults
So, what am I doing wrong?
Reply With Quote
  #2   (View Single Post)  
Old 25th January 2009
jggimi's Avatar
jggimi jggimi is offline
More noise than signal
 
Join Date: May 2008
Location: USA
Posts: 7,977
Default

Confirm your environment variable is actually set appropriately:
$ echo $PKG_PATH
If that looks good to you, double check with:
$ ftp $PKG_PATH
Reply With Quote
  #3   (View Single Post)  
Old 25th January 2009
nihonto nihonto is offline
Fdisk Soldier
 
Join Date: May 2008
Posts: 65
Default

No probs with both:

Quote:
/home/nihonto $ echo $PKG_PATH
ftp://ftp.freenet.de/pub/ftp.openbsd...packages/i386/
/home/nihonto $ ftp $PKG_PATH
Trying 2001:748:100:50::4...
ftp: connect to address 2001:748:100:50::4: No route to host
Trying 2001:748:100:50::3...
ftp: connect to address 2001:748:100:50::3: No route to host
Trying 2001:748:100:50::5...
ftp: connect to address 2001:748:100:50::5: No route to host
Trying 2001:748:100:50::6...
ftp: connect to address 2001:748:100:50::6: No route to host
Trying 194.97.2.67...
Connected to ftp-0.freenet.de.
220 ftp.freenet.de FTP server ready.
331 Password required.
230 Login completed.
Remote system type is UNIX.
Using binary mode to transfer files.
200 Type set to I.
250 Changed working directory to "/pub/ftp.openbsd.org/pub/OpenBSD/4.4/packages/i386".
ftp>
Strange, isn't it?
Reply With Quote
  #4   (View Single Post)  
Old 25th January 2009
BSDfan666 BSDfan666 is offline
Real Name: N/A, this is the interweb.
Banned
 
Join Date: Apr 2008
Location: Ontario, Canada
Posts: 2,223
Default

Kinda seems like you're setting the environment variable for a user.. but then.. logging into root to install the package.

How are you logging into root? login? su? sudo?

More info please..
Reply With Quote
  #5   (View Single Post)  
Old 25th January 2009
nihonto nihonto is offline
Fdisk Soldier
 
Join Date: May 2008
Posts: 65
Default

Quote:
Originally Posted by BSDfan666 View Post
How are you logging into root? login? su? sudo?

More info please..
I'm using su.

Funny thing - I just tried out a different mirror and it worked.

Quote:
export PKG_PATH=ftp://openbsd.ftp.fu-berlin.de/pub/OpenBSD/4.4/packages/i386/
... and then:

Quote:
# pkg_add -i xpdf
t1lib-5.1.0p1: complete
ghostscript-fonts-8.11p0: complete
xpdf-utils-3.02pl2p1: complete
openmotif-2.3.0p0: complete
xpdf-3.02pl2p4: complete
With the mirror I used before, I could get the packages if I gave pkg_add the whole path on the mirror, including the exact packagename. But when I used the same mirror as PKG_PATH in my .profile it doesn't work.
Reply With Quote
  #6   (View Single Post)  
Old 27th January 2009
Randux Randux is offline
Disgruntled desktop user
 
Join Date: May 2008
Location: Siberia
Posts: 100
Default

I found a similar problem but with AMD64. It seems to me that alot of the mirrors are missing packages or parts of packages. For example I had to look far and wide for a mirror that even had RARCRACK. pkg_add died in the middle so I wound up downloading the ports tree and building it from source instead.

This may be related to your problem or not.....
__________________
BSDForums.org refugee #27
Multibooting with LILO
Reply With Quote
  #7   (View Single Post)  
Old 27th January 2009
J65nko J65nko is offline
Administrator
 
Join Date: May 2008
Location: Budel - the Netherlands
Posts: 4,128
Default

Please consider this
Code:
j65nko@hercules[~]export PKG_PATH=ftp://ftp.freenet.de/pub/ftp.openbsd.org/pub/OpenBSD/4.4/packages/i386/
j65nko@hercules[~]echo $PKG_PATH
ftp://ftp.freenet.de/pub/ftp.openbsd.org/pub/OpenBSD/4.4/packages/i386/

j65nko@hercules[~]su root
Password:
# echo $PKG_PATH
ftp://ftp.freenet.de/pub/ftp.openbsd.org/pub/OpenBSD/4.4/packages/i386/
# exit

j65nko@hercules[~]su - root
Password:
Terminal type? [xterm] 
root@hercules[~]echo $PKG_PATH                                                                                                                          

root@hercules[~]
__________________
You don't need to be a genius to debug a pf.conf firewall ruleset, you just need the guts to run tcpdump
Reply With Quote
  #8   (View Single Post)  
Old 28th January 2009
nihonto nihonto is offline
Fdisk Soldier
 
Join Date: May 2008
Posts: 65
Default

Quote:
Originally Posted by J65nko View Post
Please consider this
Code:
j65nko@hercules[~]export PKG_PATH=ftp://ftp.freenet.de/pub/ftp.openbsd.org/pub/OpenBSD/4.4/packages/i386/
j65nko@hercules[~]echo $PKG_PATH
ftp://ftp.freenet.de/pub/ftp.openbsd.org/pub/OpenBSD/4.4/packages/i386/

j65nko@hercules[~]su root
Password:
# echo $PKG_PATH
ftp://ftp.freenet.de/pub/ftp.openbsd.org/pub/OpenBSD/4.4/packages/i386/
# exit

j65nko@hercules[~]su - root
Password:
Terminal type? [xterm] 
root@hercules[~]echo $PKG_PATH                                                                                                                          

root@hercules[~]
Sorry, I don't get the point!
Reply With Quote
  #9   (View Single Post)  
Old 28th January 2009
BSDfan666 BSDfan666 is offline
Real Name: N/A, this is the interweb.
Banned
 
Join Date: Apr 2008
Location: Ontario, Canada
Posts: 2,223
Default

It's pretty obviously, one resets the environment.. the other does not.

su - root is the deprecated form of su -l root.

Quote:
Originally Posted by su(1)
-l Simulate a full login. The environment is discarded except for HOME, SHELL, PATH, TERM, LOGNAME, and USER. HOME and SHELL are modified as above. LOGNAME and USER are set to the target login. PATH is set to the value specified by the ``path'' entry in login.conf(5). TERM is imported from your current environment. The invoked shell is the target login's, and su will change directory to the target login's home directory.
The question is, how do you use su?
Reply With Quote
Old 28th January 2009
marcolino's Avatar
marcolino marcolino is offline
Real Name: Mark
Custom Title Maker
 
Join Date: May 2008
Location: At the Mountains of Madness
Posts: 128
Default

Quote:
Originally Posted by BSDfan666 View Post
The question is, how do you use su?
I use it like this...

sudo command

But that's just me. nihonto, give sudo a try. Read the appropriate man pages, etc..
__________________
That's nothing a couple o' pints wouldn't fix.
Reply With Quote
Old 28th January 2009
J65nko J65nko is offline
Administrator
 
Join Date: May 2008
Location: Budel - the Netherlands
Posts: 4,128
Default

Quote:
Originally Posted by nihonto View Post
Sorry, I don't get the point!
I set and export the variable PKG_PATH as user J65nko. That means that all subsequent commands will be able to see, and use the contents of PKG_PATH.

When I su root I switch user to 'root', but 'root' retains most of my environment, and thus the PKG_PATH variable.

However, a su - root simulates a full login as root, and discards most of j65nko's environment variables, including the PKG_PATH. That is why echo'ing PKG_PATH produces nothing.
__________________
You don't need to be a genius to debug a pf.conf firewall ruleset, you just need the guts to run tcpdump
Reply With Quote
Old 28th January 2009
BSDfan666 BSDfan666 is offline
Real Name: N/A, this is the interweb.
Banned
 
Join Date: Apr 2008
Location: Ontario, Canada
Posts: 2,223
Default

I think this was a server problem.. relevant post below.

http://marc.info/?l=openbsd-ports&m=123317771715254&w=2

The fix in this case is simple..
export PKG_PATH=ftp://ftp.freenet.de/pub/ftp.openbsd.org/pub/OpenBSD/4.4/packages/i386

Remove the trailing forward slash.
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
my pf won't allow my server to resolve revzalot OpenBSD Security 21 12th September 2009 10:39 AM
My version of pkg_add :) DNAeon FreeBSD Ports and Packages 26 15th October 2008 06:58 AM
pkg_add g95;g95 x.f95: cannot find g95 enpey OpenBSD Packages and Ports 8 27th August 2008 12:48 AM
pkg_add -r does not use exported packagesite kasse FreeBSD Ports and Packages 16 26th August 2008 08:42 PM
pkg_add error buba OpenBSD Packages and Ports 4 13th June 2008 03:29 PM


All times are GMT. The time now is 07:22 PM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Content copyright © 2007-2010, the authors
Daemon image copyright ©1988, Marshall Kirk McKusick