Search code examples
freebsdpkg-config

No active remote repositories configured


In FreeBSD 8.4, pkg install is not working giving error.

$ pkg install git 
pkg:No active remote repositories configured.

pkg_add -r application_name is working and installing from ports is also it works fine but for above problem, is there any solution?


Solution

  • I found a link saying the remote repo in /etc/pkg/FreeBSD.conf does not exist! So we have to create one.

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

    Also need to create the certificate https://svn0.us-west.freebsd.org/base/head/share/keys/pkg/trusted/pkg.freebsd.org.2013102301 in /usr/share/keys/pkg/trusted/

    $ mkdir -p /usr/share/keys/pkg/trusted
    $ wget https://svn0.us-west.freebsd.org/base/head/share/keys/pkg/trusted/pkg.freebsd.org.2013102301 --no-check-certificate -O /usr/share/keys/pkg/trusted/pkg.freebsd.org.2013102301
    

    Now, we can update pkg and see if we have a repo:

    /usr/share/keys/pkg/trusted $ pkg update -f
    Updating FreeBSD repository catalogue...
    Fetching meta.txz: 100%    968 B   1.0kB/s    00:01
    Fetching packagesite.txz: 100%    5 MiB  98.8kB/s    00:56
    Processing entries: 100%
    FreeBSD repository update completed. 24610 packages processed.