DaemonForums  

Go Back   DaemonForums > NetBSD > NetBSD Package System (pkgsrc)

NetBSD Package System (pkgsrc) Installation and upgrading of packages on NetBSD.

Reply
 
Thread Tools Display Modes
  #1   (View Single Post)  
Old 25th November 2016
paulr paulr is offline
Port Guard
 
Join Date: Oct 2016
Posts: 16
Default Can't download any packages via pkg_add

Hello again.

::I'm a newbie::

Now my NetBSD has Internet connection within VirtualBox (real PC cant get connection), but I can't download any packages after installation. I tried latest version 6 and 7. I tried to download from http://ftp.netbsd.org/pub/pkgsrc/packages/NetBSD/amd64/ and even tried to dl from the q3 folders for any netbsd version.

The Installer can download all needed files, but since i am in the menu to set root Password and DL pkgbin, the download doesn't work.

Excuse my bad english.
Hope you can help me again.

Ty
Reply With Quote
  #2   (View Single Post)  
Old 25th November 2016
darktrym's Avatar
darktrym darktrym is offline
standard-bearer
 
Join Date: Feb 2011
Location: Düsseldorf
Posts: 106
Default

For my understanding, you have an internet connection and can ping 8.8.8.8 but you can't download any package. Your PKG_PATH looks like http://ftp.netbsd.org/pub/pkgsrc/pac.../amd64/7.0/All, what do you mean your installer can download, what kind of installation do you use?
__________________
NetBSD 8.99.25(AMD64)@Xiaomi Air 1.Gen
Reply With Quote
  #3   (View Single Post)  
Old 26th November 2016
paulr paulr is offline
Port Guard
 
Join Date: Oct 2016
Posts: 16
Default

I used the cd image without the software stuff:
ftp://ftp.netbsd.org/pub/NetBSD/NetB...llation/cdrom/

After full installation witht the big iso-file it didnt work either.

I tried the default way in the installation to install pkgin and I also typed this:
pkg_add ftp://ftp.netbsd.org/pub/pkgsrc/pack...n-0.9.4nb3.tgz

It lasts 1-2 seconds, then error message appears (in both cases: this command and default command):

"pkg_add: Can't process ftp://ftp.netbsd.org/pub/pkgsrc/pack....2/All/pkgin*: Not found
pkg_add: 1 package addition failed"


This looks strange too

Last edited by paulr; 26th November 2016 at 02:33 PM.
Reply With Quote
  #4   (View Single Post)  
Old 26th November 2016
shep shep is offline
Real Name: Scott
Arp Constable
 
Join Date: May 2008
Location: Dry and Dusty
Posts: 1,503
Default

The installation media are located in

http://ftp.fr.netbsd.org/pub/NetBSD/...-7.0.2/images/

NetBSD *.iso images are not hybids and will not boot when written to a usb thumb drive. For i386 and amd64, they supply *.img.gz files that are gunzip(1) and written to a usb drive with dd(1).

In order to retrieve pkgin(1) you need to export your PKG_PATH in your shell. An example, using the default /sbin/sh shell is at the following site. Warning this site comes with baggage.
pkgin howto

I just finished installing xfce4 in NetBSD. There are some on-line guides but there are now some quirks - the meta-pkg did not install tdb and generated errors. If you install tdb first, the xfce4 meta-pkg will completely load with a few warnings and no frank errors.

Last edited by shep; 26th November 2016 at 04:50 PM.
Reply With Quote
  #5   (View Single Post)  
Old 26th November 2016
darktrym's Avatar
darktrym darktrym is offline
standard-bearer
 
Join Date: Feb 2011
Location: Düsseldorf
Posts: 106
Default

Again, are you connected to Internet I mean do you run dhclient before the installer started or after the boot?
__________________
NetBSD 8.99.25(AMD64)@Xiaomi Air 1.Gen
Reply With Quote
  #6   (View Single Post)  
Old 26th November 2016
paulr paulr is offline
Port Guard
 
Join Date: Oct 2016
Posts: 16
Default

@ shep

i tried the images and the tut step by step before. didnt work. maybe im missing sth.


@darktrym

Yes, i think so. The IPv4 Ping succeeds, but not the IPv6 ping.
When i use the small cd-images from ftp://ftp.netbsd.org/pub/NetBSD/NetB...llation/cdrom/, it downloads all additional stuff successfully.
The pkgsrc.tgz always fails at 99% and i cant download any other packages in NetBSD.

The steps i did:

1. Installing file system and so on on default settings.
2. Installing additional programms from CD (Big Image) or the internet (small cd-image).

When installation is finished, the network is still working, but somehow i get these errors.

(Tried Version 6 and 7)

System: I'm using Virtual Box default emulated hardware, cuz my real pc can't get an internet connection (at least in v6. didnt tried v7 yet).
Reply With Quote
  #7   (View Single Post)  
Old 26th November 2016
darktrym's Avatar
darktrym darktrym is offline
standard-bearer
 
Join Date: Feb 2011
Location: Düsseldorf
Posts: 106
Default

Ok, then your path isn't correct. NetBSD changed its package path from amd64 to x86_64 for PKG_PATH.
__________________
NetBSD 8.99.25(AMD64)@Xiaomi Air 1.Gen
Reply With Quote
  #8   (View Single Post)  
Old 26th November 2016
shep shep is offline
Real Name: Scott
Arp Constable
 
Join Date: May 2008
Location: Dry and Dusty
Posts: 1,503
Default

amd64 is linked to x86_64:
lrwxrwxr-x 1 ftpmaint 1 6 May 28 2008 amd64 -> x86_64

amd64 should work and does on my pkgin setup.
Reply With Quote
  #9   (View Single Post)  
Old 26th November 2016
paulr paulr is offline
Port Guard
 
Join Date: Oct 2016
Posts: 16
Default

y. i already tried x86-64 when i read that in another thread on this forum. didn't work either.
Reply With Quote
Old 26th November 2016
shep shep is offline
Real Name: Scott
Arp Constable
 
Join Date: May 2008
Location: Dry and Dusty
Posts: 1,503
Default

NetBSD sites use extensive soft links and if you look at the site with an ftp client, the links will be evident. In your case stable -> pkgsrc-2016Q3 and if you look at that directory"
Code:
ftp> pwd
257 "/pub/pkgsrc/pkgsrc-2016Q3" is the current directory.
ftp> ls
150 Opening ASCII mode data connection for '/bin/ls'.
total 543860
drwxrwxr-x  52 600  netbsd      2048 Nov 26 02:34 pkgsrc
-rw-r--r--   1 600  netbsd  42932880 Sep 30 18:55 pkgsrc-2016Q3.tar.bz2
-rw-r--r--   1 600  netbsd        63 Sep 30 18:55 pkgsrc-2016Q3.tar.bz2.MD5
-rw-r--r--   1 600  netbsd        72 Sep 30 18:55 pkgsrc-2016Q3.tar.bz2.SHA1
-rw-r--r--   1 600  netbsd  58114496 Sep 30 18:55 pkgsrc-2016Q3.tar.gz
-rw-r--r--   1 600  netbsd        62 Sep 30 18:55 pkgsrc-2016Q3.tar.gz.MD5
-rw-r--r--   1 600  netbsd        71 Sep 30 18:55 pkgsrc-2016Q3.tar.gz.SHA1
-rw-r--r--   1 600  netbsd  38088932 Sep 30 18:55 pkgsrc-2016Q3.tar.xz
-rw-r--r--   1 600  netbsd        62 Sep 30 18:55 pkgsrc-2016Q3.tar.xz.MD5
-rw-r--r--   1 600  netbsd        71 Sep 30 18:55 pkgsrc-2016Q3.tar.xz.SHA1
-rw-rw-r--   1 600  netbsd  43522951 Nov 26 02:36 pkgsrc.tar.bz2
-rw-r--r--   1 600  netbsd        56 Nov 26 02:36 pkgsrc.tar.bz2.MD5
-rw-r--r--   1 600  netbsd        65 Nov 26 02:36 pkgsrc.tar.bz2.SHA1
-rw-rw-r--   1 600  netbsd  57897952 Nov 26 02:35 pkgsrc.tar.gz
-rw-r--r--   1 600  netbsd        55 Nov 26 02:35 pkgsrc.tar.gz.MD5
-rw-r--r--   1 600  netbsd        64 Nov 26 02:35 pkgsrc.tar.gz.SHA1
-rw-rw-r--   1 600  netbsd  37530916 Nov 26 02:40 pkgsrc.tar.xz
I would actually download the latest versions, November 26, in hopes of getting any updates/bug fixes. The MD5 and SHA1 files are used to validate the files integrity. It is useful when starting out to learn how to obtain an md5sum and sha1 hash.

Pkgsrc is used for you to build your own packages and is NOT needed with pkgin. pkgin installs already built packages. The xfce4 desktop I just installed was almost entirely built with pkgin. The only package I had to build was mplayer.

Last edited by shep; 26th November 2016 at 11:41 PM.
Reply With Quote
Old 27th November 2016
darktrym's Avatar
darktrym darktrym is offline
standard-bearer
 
Join Date: Feb 2011
Location: Düsseldorf
Posts: 106
Default

Pkgin has it's own flaws. It doesn't know daily versions of NetBSD and uses much space for /var/db/pkgin.
__________________
NetBSD 8.99.25(AMD64)@Xiaomi Air 1.Gen
Reply With Quote
Old 27th November 2016
shep shep is offline
Real Name: Scott
Arp Constable
 
Join Date: May 2008
Location: Dry and Dusty
Posts: 1,503
Default

I'm not sure what you mean by daily versions but for amd64/x86_64, there is a package path for current packages" This can be set in pkgin's configuration.

Code:
-rw-r--r--  1 ftpmaint  wheel      12688 Nov  8 16:24 zorro-1.1.8nb1.tgz
-rw-r--r--  1 ftpmaint  wheel     186220 Nov 25 02:34 zphoto-1.2nb43.tgz
-rw-r--r--  1 ftpmaint  wheel    1974804 Oct 18 14:48 zsh-5.2.tgz
-rw-r--r--  1 ftpmaint  wheel     217316 Oct 19 14:04 zstd-1.1.0.tgz
-rw-r--r--  1 ftpmaint  wheel      66180 Oct 19 12:43 zsync-0.6.2.tgz
-rw-r--r--  1 ftpmaint  wheel       9576 Oct 19 13:05 ztrack-1.0nb1.tgz
-rw-r--r--  1 ftpmaint  wheel      63108 Oct 20 09:07 zutils-1.5.tgz
-rw-r--r--  1 ftpmaint  wheel    8068700 Oct 31 14:32 zyGrib-7.0.0nb3.tgz
-rw-r--r--  1 ftpmaint  wheel   69248848 Nov  1 19:35 zyGrib-maps-2.4nb6.tgz
-rw-r--r--  1 ftpmaint  wheel      64596 Oct 18 00:13 zziplib-0.13.59.tgz
-rw-r--r--  1 ftpmaint  wheel      81200 Oct 19 13:39 zzuf-0.13.tgz
226 Transfer complete.
ftp> pwd
257 "/pub/pkgsrc/packages/NetBSD/x86_64/7.0_current/All" is the current direy.
ftp>
Reply With Quote
Old 27th November 2016
paulr paulr is offline
Port Guard
 
Join Date: Oct 2016
Posts: 16
Default

As i said:
Ping works.

Download always fails. Followed the recommendations of the NetBSD Guide and yours.

I'm going to try whether i can download with pkgbin, after installing it from CD.


Ty so far.
Reply With Quote
Old 27th November 2016
shep shep is offline
Real Name: Scott
Arp Constable
 
Join Date: May 2008
Location: Dry and Dusty
Posts: 1,503
Default

@paulr
I just noticed that your screenshot is the blue of the NetBSD system installer. I have never had much luck with fetching pkgsrc during installation.

I usually install without packages or package source and then boot into a working system. My system runs wpa2 wireless so I have to provision wpa_supplicant and /etc/rc.conf Once your network is functional your should be able to export the PKG_PATH and use pkg_add to install pkgin.
Reply With Quote
Old 2nd December 2016
paulr paulr is offline
Port Guard
 
Join Date: Oct 2016
Posts: 16
Default



Done with the Information provided from Unixmen. I also tried the NetBSD Guide commands.

As you can see, already have a Connection to the Internet.

And yes, ist Version 6.0 this time.
Reply With Quote
Old 2nd December 2016
shep shep is offline
Real Name: Scott
Arp Constable
 
Join Date: May 2008
Location: Dry and Dusty
Posts: 1,503
Default

There is are 2 errors in your PKG_PATH. It should be:
Code:
PKG_PATH="http://ftp.netbsd.org/pub/pkgsrc/packages/NetBSD/x86_64/6.0/All/"
"All is with a capital A and lower case L's. The 2nd instance of NetBSD is also case sensitive while the first instance (netbsd) is all lower case.

You can verify the correct path by using the builtin ftp client:
ftp -a ftp.netbsd.org.

If you are in Germany you might want to consider the pkgsrc repository in France (closer).

ftp -a ftp.fr.netbsd.org.

Last edited by shep; 2nd December 2016 at 03:25 AM.
Reply With Quote
Old 21st December 2016
paulr paulr is offline
Port Guard
 
Join Date: Oct 2016
Posts: 16
Default

Ahhhhhh.
Ty^^

You are right, I didn't think about upper and lower case.

pkg_add works just fine now

But when I try to use pkgin, it gets an unwanted behavior.

After every pkgin command it tries to download pkg_summary.bz2, but fails.
Reply With Quote
Old 21st December 2016
shep shep is offline
Real Name: Scott
Arp Constable
 
Join Date: May 2008
Location: Dry and Dusty
Posts: 1,503
Default

It is likely that your pkgin configuration file is incorrect.

My /usr/pkg/etc/pkgin/repositories.conf
Code:
Kanga$ pwd
/usr/pkg/etc/pkgin
Kanga$ cat repositories.conf
# $Id: repositories.conf,v 1.3 2012/06/13 13:50:17 imilh Exp $
#
# Pkgin repositories list
#
# Simply add repositories URIs one below the other
#
# WARNING: order matters, duplicates will not be added, if two
# repositories hold the same package, it will be fetched from 
# the first one listed in this file.
#
# This file format supports the following macros:
# $arch to define the machine hardware platform
# $osrelease to define the release version for the operating system
#
# Remote ftp repository
#
# ftp://ftp.netbsd.org/pub/pkgsrc/packages/NetBSD/$arch/5.1/All
#
# Remote http repository
#
# http://mirror-master.dragonflybsd.org/packages/$arch/DragonFly-$osrelease/stable/All
#
# Local repository (must contain a pkg_summary.gz or bz2)
#
# file:///usr/pkgsrc/packages/All
# NetBSD OS release can look like 6.0_STABLE, do not use it as-is
ftp://ftp.netbsd.org/pub/pkgsrc/packages/NetBSD/$arch/7.0.2/All
In order for pkgin to function, it needs to downlowd the the compressed pkg_summary for the repository you are using.
Code:
ftp> ls *summary*
229 Entering Extended Passive Mode (|||54881|)
150 Opening ASCII mode data connection for '/bin/ls'.
-rw-r--r--  1 601  netbsd    88999 Jul  4 11:58 pkg_summary-utils-0.66.0.tgz
-rw-rw-r--  1 601  netbsd  2575593 Nov 30 12:33 pkg_summary.bz2
-rw-rw-r--  1 601  netbsd  3777183 Nov 30 12:33 pkg_summary.gz
226 Transfer complete.
ftp> pwd
Remote directory: /pub/pkgsrc/packages/NetBSD/x86_64/7.0_2016Q3/All
ftp> bye
221-
    Data traffic for this session was 0 bytes in 0 files.
    Total traffic for this session was 25070 bytes in 9 transfers.
221 Thank you for using the FTP service on ftp.NetBSD.org

Last edited by shep; 21st December 2016 at 08:14 PM.
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
reinstall all packages installed by pkg_add mfaridi OpenBSD Packages and Ports 4 5th March 2015 12:47 PM
Why does pkg_add sometimes report "packages is empty" ? sw2wolf OpenBSD Packages and Ports 2 22nd March 2012 12:51 AM
OpenBSD 4.3 Download jepettrey OpenBSD General 2 3rd August 2010 02:30 AM
download manager graudeejs General software and network 11 16th October 2008 04:23 AM
FF download day!? kace Off-Topic 24 28th June 2008 05:57 PM


All times are GMT. The time now is 07:48 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