Error: No pkg(8) database found

Trying to install packages generates above mentioned error message.I have done on a fresh installed 10.0 so far:
pkg bootstrap
Later on I tried:
pkg bootstrap -f
pkg2ng
as I was unsure whether 10.0 uses the old pkg by default. I can not find any information on how to generate the missing database.

Can anyone help?
 
What error are you getting? Please post the whole thing, not just the last line.
 
Already done that. Same error. Version is 1.3.8 now. It registers everything installed from the ports just fine but I get that error message if I try to install precompiled packages in the way suggested in the handbook.
 
Do you anything changed in /usr/local/etc/pkg.conf, /usr/local/etc/pkgtools.conf, /etc/pkg/FreeBSD.conf. Whats in /usr/local/etc/pkg/repos/FreeBSD.conf.

I don't believe it helps, but you can try to add another user, and try it with this user - if it's anything with the enviroment.
 
I have renamed /usr/local/etc/pkg.conf.sample to pkg.conf but didn't change anything. As I understand it, there are just the defaults in it commented. That change was made after I realized that there is an issue of cause so this definitely didn't cause the issue.
 
KBr said:
I have done on a fresh installed 10.0 so far ... as I was unsure whether 10.0 uses the old pkg by default.

10.0-RELEASE used pkg by default. So you have no need to convert it. Additionally, you wouldn't have had a prior database on a fresh install anyway. You should be good.
 
SirDice said:
What does ls -l /var/db/pkg/ show?
Code:
root@bsdtest:~ # ls -l /var/db/pkg/
total 13764
-rw-r--r--  1 root  wheel      246 23 Sep 08:12 FreeBSD.meta
-rw-r--r--  1 root  wheel  7364608 23 Sep 20:52 local.sqlite
-rw-r--r--  1 root  wheel    63488 23 Sep 08:12 repo-FreeBSD.sqlite
-rw-r--r--  1 root  wheel  6565888 17 Jan  2014 repo-FreeBSD_install_cdrom.sqlite
root@bsdtest:~ #
 
What we have not seen is the commands you are running to try to install packages. As shown above, using ports worked.
 
wblock@ said:
What we have not seen is the commands you are running to try to install packages. As shown above, using ports worked.
Indeed. I reinstalled pkg from the ports and meanwhile xorg.
I tried things like pkg search xorg and pkg install xorg. pkg info does work as expected.
I tried to install packages from bsdconfig, using ftp or the install dvd. But it doesn't work either.
I have,besides this issue, issues with getting xorg running with a radeon card. I got the suggestion to try 10.1 beta2. I will do that as soon as I have downloaded the iso. There may have been something badly gone wrong with this install.
 
I have just reinstalled the whole system with 10.1 beta2 AMD. Just after install I tried to install packages from DVD via bsdconfig without doing anything else after rebooting the box.
Inserted Install DVD again --> started bsdconfig --> selected '3 packages' --> '1 CD/DVD' --> selected ' iso9660/FREEBSD_INSTALL'
and got message Error No pkg(8) database found!.
But pkg install does now work! After the initial invocation, pkg noticed that there is no database and built it itself. I suppose invocation of pkg via bsdconfig should do the same trick to get it working. Like any new user would expect it to, instead of issuing an error message. Anyway, thank you for looking into this.

I am using FreeBSD on servers for about 15 years. I am testing it now as an educational system (as an alternative to linux, as that's getting more and more opaque lately). It must be installable for complete beginners on older Pentium4 hardware. That it still doesn't work with an old onboard radeon card is not very promising unfortunately.
 
Last edited by a moderator:
No, pkg doesn't need the invocation via bsdconfig, it should work just after install without anything to do. There's something else wrong.
 
Last edited by a moderator:
I've download 10.1-RELEASE (CD iso) and installed it in VBox. After entering bsdconfig it attempts to update the repository catalog but it takes too long for an update (40 minutes) and no response.
 
It doesn't work. In the FreeBSD installation I've chosen sh (but it seems csh was selected as the default) and I tried this command from errata:
Code:
# setenv REPOS_DIR /dist/packages/repos
# pkg bootstrap
and I got this
Code:
pkg already bootstrapped at /usr/local/sbin/pkg
and then (just some test) pkg install gnome and I got this
Code:
no valid repository found.
 
Back
Top