Problem with pkg

1,398 views
Skip to first unread message

Filippo Moretti

unread,
Feb 27, 2017, 8:20:15 AM2/27/17
to FreeBSD Current
After a blackout caused by my wife I only get a few pkg shown with the command pkg info while they should be hundreds.I also get this error message when trying to install packages by pkg installpkg: Repository FreeBSD load error: access repo file(/var/db/pkg/repo-FreeBSD.sqlite) failed: No such file or directory(I do have a file name local.sqlite)Is there a way to recover the pkg database or should I reinstall the OS.Filippo


_______________________________________________
freebsd...@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to "freebsd-curre...@freebsd.org"

Tomoya Tabuchi

unread,
Feb 27, 2017, 9:34:55 AM2/27/17
to filip...@yahoo.com, freebsd...@freebsd.org
Hello,

I have a similar problem.
pkg(8) tells me to do a `pkg update', and when I do that I get the following.

Updating FreeBSD repository catalogue...
pkg: Repository FreeBSD load error: access repo
file(/var/db/pkg/repo-FreeBSD.sqlite) failed: No such file or directory
meta.txz : 100% 944 B 0.9kB/s
00:01
packagesite.txz : 100% 6 MiB 986.3kB/s
00:06
pkg: rsa verify failed: error:04091077:rsa routines:INT_RSA_VERIFY:wrong
signature length
pkg: No trusted certificate has been used to sign the repository
Unable to update repository FreeBSD
Error updating repositories!

I am on r314247 and the version of pkg(8) is 1.10.0.

Tomoya

Domagoj Stolfa

unread,
Feb 27, 2017, 9:38:15 AM2/27/17
to filip...@yahoo.com, freebsd...@freebsd.org
Having the same issues, even after numerous attempts to manually fix it.

--
Best regards,
Domagoj Stolfa
signature.asc

Guido Falsi

unread,
Feb 27, 2017, 9:49:17 AM2/27/17
to Filippo Moretti, FreeBSD Current
On 02/27/17 14:02, Filippo Moretti wrote:
> After a blackout caused by my wife I only get a few pkg shown with the command pkg info while they should be hundreds.I also get this error message when trying to install packages by pkg installpkg: Repository FreeBSD load error: access repo file(/var/db/pkg/repo-FreeBSD.sqlite) failed: No such file or directory(I do have a file name local.sqlite)Is there a way to recover the pkg database or should I reinstall the OS.Filippo
>

Periodic scripts do backup the package database to /var/backups/ when run.

If the only problem is the database file corruption and depending on how
old the backup DB is you could be lucky with that.

The repo database can be simply removed, pkg should download a new one.

--
Guido Falsi <m...@madpilot.net>

Guido Falsi

unread,
Feb 27, 2017, 9:49:19 AM2/27/17
to Filippo Moretti, FreeBSD Current
On 02/27/17 14:02, Filippo Moretti wrote:
> After a blackout caused by my wife I only get a few pkg shown with the command pkg info while they should be hundreds.I also get this error message when trying to install packages by pkg installpkg: Repository FreeBSD load error: access repo file(/var/db/pkg/repo-FreeBSD.sqlite) failed: No such file or directory(I do have a file name local.sqlite)Is there a way to recover the pkg database or should I reinstall the OS.Filippo
>

Periodic scripts do backup the package database to /var/backups/ when run.

If the only poroblem is the database file corruption and depending on
how old the backup DBB is you could be lucky with that.

The repo database can be simply removed, pkg should download a new one.

--
Guido Falsi <m...@madpilot.net>

Baptiste Daroussin

unread,
Feb 27, 2017, 10:05:50 AM2/27/17
to Domagoj Stolfa, filip...@yahoo.com, freebsd...@freebsd.org
On Mon, Feb 27, 2017 at 03:37:55PM +0100, Domagoj Stolfa wrote:
> Having the same issues, even after numerous attempts to manually fix it.
>

This is a problem on the freebsd side a fix has been made, new repository should
be out soon

Only 12-CURRENT is inpacted right now
11.0-RELEASE amd64 was also inpacted but has been worked around

Best regards,
Bapt
signature.asc

Chris H

unread,
Feb 27, 2017, 2:28:50 PM2/27/17
to freebsd...@freebsd.org
On Mon, 27 Feb 2017 13:02:23 +0000 (UTC) Filippo Moretti
<filip...@yahoo.com> wrote

> After a blackout caused by my wife I only get a few pkg shown with the
> command pkg info while they should be hundreds.I also get this error message
> when trying to install packages by pkg installpkg: Repository FreeBSD load
> error: access repo file(/var/db/pkg/repo-FreeBSD.sqlite) failed: No such file
> or directory(I do have a file name local.sqlite)Is there a way to recover the
> pkg database or should I reinstall the OS.Filippo
>
>
perodic(8) creates them for you. As a rule, you should be able
to find a suitable backup copy in
/var/backups
in the form of pkgdb.bak.tbz*

Hope this helps!

--Chris

Chris H

unread,
Feb 27, 2017, 2:31:55 PM2/27/17
to freebsd...@freebsd.org
On Mon, 27 Feb 2017 13:02:23 +0000 (UTC) Filippo Moretti
<filip...@yahoo.com> wrote

> After a blackout caused by my wife I only get a few pkg shown with the
> command pkg info while they should be hundreds.I also get this error message
> when trying to install packages by pkg installpkg: Repository FreeBSD load
> error: access repo file(/var/db/pkg/repo-FreeBSD.sqlite) failed: No such file
> or directory(I do have a file name local.sqlite)Is there a way to recover the
> pkg database or should I reinstall the OS.Filippo

OH! forgot to mention:

pkg.sql.xz.*

also located in /var/backups

--Chris
Reply all
Reply to author
Forward
0 new messages