LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Other *NIX Forums > *BSD
User Name
Password
*BSD This forum is for the discussion of all BSD variants.
FreeBSD, OpenBSD, NetBSD, etc.

Notices


Reply
  Search this Thread
Old 06-25-2010, 11:47 AM   #1
Onoir
LQ Newbie
 
Registered: May 2010
Posts: 24

Rep: Reputation: 15
FreeBSD 8.0 ports don't download existing packages


I just installed FreeBSD, and it ended up being a minimal command line system only. Its not all bad, kind of gave me a crash course in BSD. I managed to get X and KDE installed. However, pretty much anything else using the command
Code:
pkg_add -r <package_name>
doesn't work.

It points to the correct ftp site, so I go there in my browser, and the files are all there, but it doesn't see them or download them. Obviously, some things I have been able to install "manually", but programs such as pidgin, with a million and a half dependencies, would take me a lifetime to sort out.

I guess the more technical explanation is: the program is looking for the package "pidgin.tbz" in ftp://site/8.0/latest/, and the file is there, but it cannot find it.

Do I need to update the ports list? Change something somewhere? My Linux knowledge is what got me this far but from here I am unsure what to do.
 
Old 06-25-2010, 12:18 PM   #2
rocket357
Member
 
Registered: Mar 2007
Location: 127.0.0.1
Distribution: OpenBSD-CURRENT
Posts: 485
Blog Entries: 187

Rep: Reputation: 74
Silly question, but the ftp site is an official FreeBSD mirror, or something you set up?

What is the output of "echo $PACKAGEROOT" and "echo $PACKAGESITE"?

Quote:
Originally Posted by pkg_add(1)

The environment variable PACKAGEROOT specifies an alternate location for
pkg_add to fetch from. The fetch URL is built using this environment
variable and the automatic directory logic that pkg_add uses when the -r
option is invoked. An example setting would be "ftp://ftp3.FreeBSD.org".

The environment variable PACKAGESITE specifies an alternate location for
pkg_add to fetch from. This variable subverts the automatic directory
logic that pkg_add uses when the -r option is invoked. Thus it should be
a complete URL to the remote package file(s).

Also, there's a distinct difference between packages and ports in the BSD world. Packages consist of precompiled software, ports consist of source code distributions of software.

Last edited by rocket357; 06-25-2010 at 12:46 PM.
 
Old 06-25-2010, 04:47 PM   #3
Onoir
LQ Newbie
 
Registered: May 2010
Posts: 24

Original Poster
Rep: Reputation: 15
"echo $PACKAGEROOT" and "echo $PACKAGESITE" don't return anything at all. Here is what I see when trying to install pidgin via a remote source.

Quote:
$ sudo pkg_add -r pidgin
Error: Unable to get ftp://ftp.freebsd.org/pub/FreeBSD/po...st/pidgin.tbz: Can't open data connection
pkg_add: unable to fetch 'ftp://ftp.freebsd.org/pub/FreeBSD/ports/amd64/packages-8.0-release/Latest/pidgin.tbz' by URL
To answer your other question, I'm new to the whole concept of ports, and it worked for me to install X and KDE, as well as a window manager. Thus said, I didn't feel it was necessary to change what seemed to be working. Unfortunately, its not really working now.

Last edited by Onoir; 06-25-2010 at 04:50 PM.
 
Old 06-25-2010, 10:15 PM   #4
Onoir
LQ Newbie
 
Registered: May 2010
Posts: 24

Original Poster
Rep: Reputation: 15
I hate to "bump" this thread but I'm trying to get a fully functioning BSD system set up, with a basic desktop + security focus, and programs are no longer installing how they should. I didn't change anything to any port files but it no longer can locate, download, and install my programs.

I really could use some help.
 
Old 06-26-2010, 10:36 AM   #5
Onoir
LQ Newbie
 
Registered: May 2010
Posts: 24

Original Poster
Rep: Reputation: 15
Here is the output of pkg_add -rv firefox if it helps at all.
Quote:
$ sudo pkg_add -rv firefox
Password:
scheme: [ftp]
user: []
password: []
host: [ftp.freebsd.org]
port: [0]
document: [/pub/FreeBSD/ports/amd64/packages-8.0-release/Latest/firefox.tbz]
---> ftp.freebsd.org:21
looking up ftp.freebsd.org
connecting to ftp.freebsd.org:21
<<< 220 Welcome to freebsd.isc.org.
>>> USER anonymous
<<< 331 Please specify the password.
>>> PASS <user>@<host>.org
<<< 230 Login successful.
>>> PWD
<<< 257 "/"
>>> CWD pub/FreeBSD/ports/amd64/packages-8.0-release/Latest
<<< 250 Directory successfully changed.
>>> MODE S
<<< 200 Mode set to S.
>>> TYPE I
<<< 200 Switching to Binary mode.
binding data socket
>>> PORT 192,168,1,5,223,68
<<< 200 PORT command successful. Consider using PASV.
initiating transfer
>>> RETR firefox.tbz
<<< 550 Failed to open file.
Error: Unable to get ftp://ftp.freebsd.org/pub/FreeBSD/po...t/firefox.tbz: File unavailable (e.g., file not found, no access)
pkg_add: unable to fetch 'ftp://ftp.freebsd.org/pub/FreeBSD/ports/amd64/packages-8.0-release/Latest/firefox.tbz' by URL
pkg_add: 1 package addition(s) failed
 
Old 06-27-2010, 10:21 PM   #6
Onoir
LQ Newbie
 
Registered: May 2010
Posts: 24

Original Poster
Rep: Reputation: 15
I had to go to the FreeBSD forums for help since no one here seemed to know what to do. I solved my problem but there are two things you need to check if you have the same issue.

1. whether or not you need to use passive or active ftp mode for package retrieval and installation. your firewall can determine this.

2. "sudo" in FreeBSD does not grant you the same rights as it does in Linux. using "sudo pkg_add -r <package>" will not work because you don't actually have enough rights to do it. First you need to do a "sudo su -" then try to install your package.

Hope this helps anyone else with the same problem.
 
Old 06-30-2010, 10:08 PM   #7
teckk
LQ Guru
 
Registered: Oct 2004
Distribution: Arch
Posts: 5,146
Blog Entries: 6

Rep: Reputation: 1833Reputation: 1833Reputation: 1833Reputation: 1833Reputation: 1833Reputation: 1833Reputation: 1833Reputation: 1833Reputation: 1833Reputation: 1833Reputation: 1833
Quote:
sudo pkg_add -r <package>" will not work because you don't actually have enough rights to do it.
That is incorrect.
Code:
sudo pkg_add -r xterm
Will fetch and install xterm if you allow user to install things in the sudoers file. I do it all the time.

I read your post on BSD forums. Glad you got it fixed.
 
Old 07-02-2010, 04:51 PM   #8
Onoir
LQ Newbie
 
Registered: May 2010
Posts: 24

Original Poster
Rep: Reputation: 15
Well I am in the sudoers file and it didn't make any difference, so maybe something else is wrong.
 
Old 07-03-2010, 07:58 AM   #9
teckk
LQ Guru
 
Registered: Oct 2004
Distribution: Arch
Posts: 5,146
Blog Entries: 6

Rep: Reputation: 1833Reputation: 1833Reputation: 1833Reputation: 1833Reputation: 1833Reputation: 1833Reputation: 1833Reputation: 1833Reputation: 1833Reputation: 1833Reputation: 1833
Quote:
Well I am in the sudoers file and it didn't make any difference, so maybe something else is wrong.
What do you mean by that?

/usr/local/etc/sudoers
Code:
# Uncomment to allow people in group wheel to run all commands
# %wheel	ALL=(ALL) ALL
That will allow users in wheel group to do anything. Probably not wise unless you are the only user on the box.

Or you can make up your own rules allowing users to do only what you want.

You can also use pkg_add specifying the whole path to the package if you don't have your $PACKAGESITE set right.
Code:
pkg_add -r  ftp://ftp.freebsd.org/pub/FreeBSD/ports/amd64/packages-8.0-release/Latest/pidgin.tbz
 
  


Reply



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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Question about FreeBSD ports / binary packages / intel graphics drivers and Xorg pseudonomous *BSD 3 04-27-2009 10:49 AM
Freebsd installer doesn't see existing partitions natewlew *BSD 14 09-16-2006 05:36 PM
FreeBSD packages/ports on a old computer jaakkop *BSD 2 09-16-2006 01:16 AM
Trying to recompile existing packages or new packages with optimization nx5000 Debian 6 02-28-2006 04:18 PM
Does FreeBSD support existing partitions and ext3 filesystems? GAVollink *BSD 6 01-21-2004 08:51 PM

LinuxQuestions.org > Forums > Other *NIX Forums > *BSD

All times are GMT -5. The time now is 12:26 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration