Pkgng - No valid repository found.

Matthew Seaman m.seaman at infracaninophile.co.uk
Wed Mar 26 16:00:52 UTC 2014


On 03/26/14 11:40, Francisco Miralha da Silveira wrote:
> Hi.
> 
> I'm in trouble for two days with pkg on 9.2 with no success
> 
> #uname -a
> FreeBSD 9.2-PRERELEASE #0: Fri Jul 12 23:07:12 BRT 2013
> me at server:/usr/src/sys/amd64/compile/myeditedkernel  amd64
> 
> --------------------------------------------
> 
> Recently I installed pkgng with theese commands:
> 
> # portsnap fetch update
> # cd /usr/ports/ports-mgmt/pkg
> # make install clean
> 
> # pkg2ng
> 
> # mkdir /etc/pkg
> # mkdir /usr/local/etc/pkg
> # mkdir /usr/local/etc/pkg/repos
> # ee /usr/local/etc/pkg.conf
> 
> ======================================
> /usr/local/etc/pkg.conf
> ======================================
> ALIAS              : {
>   all-depends: query %dn-%dv,
>   annotations: info -A,
>   build-depends: info -qd,
>   download: fetch,
>   iinfo: info -i -g -x,
>   isearch: search -i -g -x,
>   leaf: query -e "%a == 0" "%n-%v",
>   leaf: query -e "%a == 0" "%n-%v",
>   list: info -ql,
>   origin: info -qo,
>   provided-depends: info -qb,
>   raw: info -R,
>   required-depends: info -qr,
>   shared-depends: info -qB,
>   show: info -f -k,
>   size: info -sq,
>   }
> 
>            pkg_dbdir: "/var/db/pkg"
>            pkg_cachedir: "/var/cache/pkg"
>            portsdir: "/usr/ports"
>            handle_rc_cripts: false
>            assume_always_yes: false
>            repos_dir: [
>                 "/etc/pkg",
>                 "/usr/local/etc/pkg/repos",
>            ]
>            syslog: true
>            autodeps: true
>            developer_mode: false
>            pkg_env: {
>                http_proxy: "http://myproxy:3128",
>            }
>            alias: {
>                origin: "info -qo",
>                nonauto: "query -e '%a == 0' '%n-%v'"
>            }
> ======================================
> 
> # pkg info : ok, I can see a list of installed packages
> 
> But # pkg install xxx or # pkg upgrade give allways the same error:
> 
> Updating repository catalogue
> No valid repository found.
> 
> I tried:
> # pkg repo /usr/local/etc/pkg/repos
> Generating repository catalog in /usr/local/etc/pkg/repos: done!

This is incorrect -- 'pkg repo' is a tool for maintaining a package
repository.  You only use it on the server side, not on the client.

> # ls /usr/local/etc/pkg/repos/
> digests.txz     packagesite.txz

These will basically say "this repository contains no packages."  As
they are pointless there, just remove those two .txz files.

> #pkg upgrade
> Updating repository catalogue
> No valid repository found.
> 
> What am I doing wrong?

You are missing the repository.conf file -- you can have as many of
these as you like, and they can be called pretty much anything so long
as the filename ends in .conf and the file is placed in
/usr/local/etc/pkg/repos/.

Try this out: save the following as /usr/local/etc/pkg/repos/FreeBSD.conf:

FreeBSD: {
  url: "pkg+http://pkg.FreeBSD.org/${ABI}/latest",
  mirror_type: "srv",
  signature_type: "fingerprints",
  fingerprints: "/usr/share/keys/pkg",
  enabled: yes
}

You'll also need to save this as
/usr/share/keys/pkg/trusted/pkg.freebsd.org.2013102301

function: "sha256"
fingerprint:
"b0170035af3acc5f3f3ae1859dc717101b4e6c1d0a794ad554928ca0cbb2f438"

	Cheers,

	Matthew





-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 1029 bytes
Desc: OpenPGP digital signature
URL: <http://lists.freebsd.org/pipermail/freebsd-pkg/attachments/20140326/d96f0e4a/attachment.sig>


More information about the freebsd-pkg mailing list