How to fix "pkg.conf no longer supported"?

I am using GHOST-BSD and I tried installing www/chromium from the ports but i get this error, so i tried installing VLC media player but it shows the same error. How do I fix this error?
Code:
root@ghostbsd ~# pkg install chromium
pkg: PACKAGESITE in pkg.conf is no longer supported.  Convert to the new repository style.  See pkg.conf(5)
pkg: Cannot parse configuration file!
root@ghostbsd ~# pkg install vlc
pkg: PACKAGESITE in pkg.conf is no longer supported.  Convert to the new repository style.  See pkg.conf(5)
pkg: Cannot parse configuration file!
root@ghostbsd ~#
 
Last edited by a moderator:
The easiest way to solve this problem is to remove /usr/local/etc/pkg.conf completely and let ports-mgmt/pkg to use the defaults for all settings that should be correct for most users.

# rm /usr/local/etc/pkg.conf
 
Hi,
PACKAGESITE was a variable used to store the repository address (see here). I guess you still have this variable defined in your pkg.conf file. According to Thread solved-pkg-update-failure.48287, you should remove this line from your pkg.conf file. You have all the information needed in pkg.conf(5) in order to set your repository properly (see REPOSITORY CONFIGURATION section).
When I tried rm /usr/local/etc/pkg.conf . It removed it (I think so ) but when I try installing Chromium and VLC it says this:
Code:
Welcome to fish, the friendly interactive shell
Type help for instructions on how to use fish
root@ghostbsd ~# pkg install chromium
No active remote repositories configured.
root@ghostbsd ~# pkg install vlc
No active remote repositories configured.
root@ghostbsd ~#
 
Last edited by a moderator:
As stated in the pkg.conf(5), you have to setup a repository. What are the results of ls /etc/pkg /usr/local/etc/pkg/repos ?

Quoting pkg.conf(5) :
To use a repository you will need at least one repository configuration
file.

Repository configuration files are searched for in order of the directo-
ries listed in the REPOS_DIR array, which defaults to /etc/pkg/ and
/usr/local/etc/pkg/repos/.

Filenames are arbitrary, but should end in `.conf' For example
/usr/local/etc/pkg/repos/myrepo.conf.
.
.
.
EXAMPLES
Repository configuration file:

FreeBSD: {
url: "pkg+http://pkg.freebsd.org/${ABI}/latest",
enabled: true,
signature_type: "fingerprints",
fingerprints: "/usr/share/keys/pkg",
mirror_type: "srv"
}
 
As stated in the pkg.conf(5), you have to setup a repository. What are the results of ls /etc/pkg /usr/local/etc/pkg/repos ?

Quoting pkg.conf(5) :
It is not there the file does not exist.
Here the error:
Code:
Welcome to fish, the friendly interactive shell
Type help for instructions on how to use fish
root@ghostbsd ~#  ls /etc/pkg /usr/local/etc/pkg/repos
ls: /etc/pkg: No such file or directory
ls: /usr/local/etc/pkg/repos: No such file or directory
root@ghostbsd ~#

I think since I'm using GHOST-BSD some files are missing I guess. I ran a command and is shows that there is no portmaster file present. Here the result of it. I think you should take a look.

Code:
root@ghostbsd /u/ports# ls
distfiles packages
root@ghostbsd /u/ports#
 
Ok. That's weird. So, create the pkg(8) folder with mkdir -p /etc/pkg, and create a FreeBSD.conf file in it with the following content :
Code:
# $FreeBSD: releng/10.1/etc/pkg/FreeBSD.conf 263938 2014-03-30 15:29:54Z bdrewery $
#
# To disable this repository, instead of modifying or removing this file,
# create a /usr/local/etc/pkg/repos/FreeBSD.conf file:
#
#  mkdir -p /usr/local/etc/pkg/repos
#  echo "FreeBSD: { enabled: no }" > /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
}
I left all the comments since they can be useful if you plan to have a custom configuration file in the /usr/local/etc/pkg/repos/ folder.

Then, try pkg update. I am not a GhostBSD user myself, so I do not know if you have a specific url to choose.
 
I created the file and put it in /usr/local/etc/pkg/repos/ and then did the update, I think it does not work. Here:
Code:
root@ghostbsd ~# pkg update
Updating FreeBSD repository catalogue...
Fetching meta.txz: 100%  968 B  1.0kB/s  00:01  
pkg: Error loading trusted certificates
pkg: repository FreeBSD has no meta file, using default settings
Fetching packagesite.txz: 100%  5 MiB 183.7kB/s  00:29  
pkg: Error loading trusted certificates
pkg: Unable to update repository FreeBSD
root@ghostbsd ~#
 
All supported FreeBSD releases gained support for the official package repositories with this errata notice early 2014. FreeBSD 10.x came with this supported out of the box.
https://www.freebsd.org/security/advisories/FreeBSD-EN-14:03.pkg.asc

PACKAGESITE was deprecated in ports-mgmt/pkg version 1.2 released in November 2013.
https://svnweb.freebsd.org/ports/he...le?revision=334937&view=markup&pathrev=334937

Your system is most likely very out of date. Which version of FreeBSD are you using and what does pkg -v return? You should start with using freebsd-update(8) to update to the latest version then you will be able to safely pkg update after from the public package repository.
 
The easiest way to solve this problem is to remove /usr/local/etc/pkg.conf completely and let ports-mgmt/pkg to use the defaults for all settings that should be correct for most users.

# rm /usr/local/etc/pkg.conf

This worked for me following an upgrade from FreeBSD v9.1 thru v9.2 to 10.2.

From /usr/ports/devel/pkgconf
I ran # make reinstall. The pkg.conf file was recreated and the port successfully reinstalled.
 
Back
Top