error when trying to usr pkg

after typing this:
pkg install py27-matplotlib

The following is returned:
Code:
Updating FreeBSD repository catalogue...
pkg: Repository FreeBSD load error: access repo file(/var/db/pkg/repo-FreeBSD.sqlite) failed: No such file or directory

And pretty much the same error for other pkg commands I try. Any ideas?

Thank you!
 
you can try removing everything from /var/db/pkg
No, no, no! That will also remove local.sqlite, which is the database that holds a list of your currently installed packages. If you remove it the system will think there's nothing installed.

pkg: Repository FreeBSD load error: access repo file(/var/db/pkg/repo-FreeBSD.sqlite) failed: No such file or directory
You get this "error" the first time you run pkg(8), the locally cached repository data simply doesn't exist yet.
 
Appears I could not ping anything. e.g. ping google.com returned nothing. This command fixed it: ifconfig em0 up; dhclient em0. Where em0 is the first thing that appears when I type ifconfig.

Now I can run the above pkg commands.
 
Back
Top