# PKG doesn't see anything [10.0R-p7]



## Duffman (Aug 31, 2014)

Hey,

I am going crazy with this problem. Everything seems configured fine, but pkg doesn't see any pkg.


```
# pkg -vv
Version                 : 1.3.7
PKG_DBDIR = "/var/db/pkg";
PKG_CACHEDIR = "/var/cache/pkg";
PORTSDIR = "/usr/ports";
INDEXDIR = "";
INDEXFILE = "INDEX-10";
HANDLE_RC_SCRIPTS = false;
ASSUME_ALWAYS_YES = false;
REPOS_DIR [
    "/etc/pkg/",
    "/usr/local/etc/pkg/repos/",
]
PLIST_KEYWORDS_DIR = "";
SYSLOG = true;
ABI = "freebsd:10:x86:64";
DEVELOPER_MODE = false;
VULNXML_SITE = "http://www.vuxml.org/freebsd/vuln.xml.bz2";
FETCH_RETRY = 3;
PKG_PLUGINS_DIR = "/usr/local/lib/pkg/";
PKG_ENABLE_PLUGINS = true;
PLUGINS [
]
DEBUG_SCRIPTS = false;
PLUGINS_CONF_DIR = "/usr/local/etc/pkg/";
PERMISSIVE = false;
REPO_AUTOUPDATE = true;
NAMESERVER = "";
EVENT_PIPE = "";
FETCH_TIMEOUT = 30;
UNSET_TIMESTAMP = false;
SSH_RESTRICT_DIR = "";
PKG_ENV {
}
DISABLE_MTREE = false;
PKG_SSH_ARGS = "";
DEBUG_LEVEL = 0;
ALIAS {
}
CUDF_SOLVER = "";
SAT_SOLVER = "";
RUN_SCRIPTS = true;
CASE_SENSITIVE_MATCH = false;
LOCK_WAIT = 1;
LOCK_RETRIES = 5;
SQLITE_PROFILE = false;
WORKERS_COUNT = 0;
READ_LOCK = false;


Repositories:
  FreeBSD: { 
    url             : "pkg+http://pkg.FreeBSD.org/freebsd:10:x86:64/latest",
    enabled         : yes,
    mirror_type     : "SRV",
    signature_type  : "FINGERPRINTS",
    fingerprints    : "/usr/share/keys/pkg"
  }
```

Everything looks fine, configuration is ok, I can go the URL and see all packages. But 
	
	



```
pkg search perl
```
 return nothing.
I get no error code and IDK why it's failing to find anything.

Can't find what is going on. I also try to install stuff with bsdconfig -> Package. But can't install anything too. I see multiple redirections happening and at the end I am redirected to a repository that doesn't exist... (cf screenshot) It's basically trying to reach this "10.0-RELEASE-p7" directory that doesn't exist anywhere.

It's like some variable somewhere is configured wrong. I didn't installed the OS (VPS host) so I am trying to figure out what is wrong.


----------



## Duffman (Aug 31, 2014)

*Re: PKG doesn't see anything*

And this seems to work.


```
# pkg update
Updating FreeBSD repository catalogue...
FreeBSD repository is up-to-date.
All repositories are up-to-date.
```

But I can't find anyway to put pkg in verbose mode to find what is going on in background.


----------



## junovitch@ (Aug 31, 2014)

I think -d would be the flag you are looking for to get a verbose debug output.  So something like `pkg -d update -f` to force an update of the catalogue would be useful.  Out of curiosity, what is the output of `host -t srv _http._tcp.pkg.freebsd.org`?  Perhaps the strange redirection is caused by your VPS provider not supporting DNS SRV records.  That's the only thing that comes to mind right now than can explain the issue.


----------



## SirDice (Sep 2, 2014)

What happens if you just use pkg-install(8) instead of bsdconfig(8)?


----------



## Duffman (Sep 3, 2014)

SirDice said:
			
		

> What happens if you just use pkg-install(8) instead of bsdconfig(8)?


bsdconfig(8) is failing to install anything, like shown in the screenshot, I was redirected 4/5 times before I get the error message.


----------



## Duffman (Sep 3, 2014)

junovitch said:
			
		

> I think -d would be the flag you are looking for to get a verbose debug output.  So something like `pkg -d update -f` to force an update of the catalogue would be useful.  Out of curiosity, what is the output of `host -t srv _http._tcp.pkg.freebsd.org`?  Perhaps the strange redirection is caused by your VPS provider not supporting DNS SRV records.  That's the only thing that comes to mind right now than can explain the issue.




```
# host -t srv _http._tcp.pkg.freebsd.org
_http._tcp.pkg.freebsd.org has SRV record 10 10 80 pkgmir.pkg.freebsd.org.
_http._tcp.pkg.freebsd.org has SRV record 50 10 80 pkg0.nyi.freebsd.org.
_http._tcp.pkg.freebsd.org has SRV record 50 10 80 pkg0.isc.freebsd.org.
_http._tcp.pkg.freebsd.org has SRV record 50 10 80 pkg0.bme.freebsd.org.
_http._tcp.pkg.freebsd.org has SRV record 50 10 80 pkg0.ydx.freebsd.org.
```

Seems that  `pkg -d update -f`  fixed it !!!! thanks buddy.


----------



## SirDice (Sep 3, 2014)

Duffman said:
			
		

> SirDice said:
> 
> 
> 
> ...


Yes, I can read. Try with pkg-install(8) _instead_ of bsdconfig(8).


----------



## junovitch@ (Jun 8, 2015)

Duffman said:


> ...
> Seems that  `pkg -d update -f`  fixed it !!!! thanks buddy.



Occasionally the `pkg update -f` is useful to force downloading the repository catalog when it doesn't detect that it changed.  The -d was just for debug and generally won't be needed.


----------



## byllgrim (Dec 8, 2015)

`pkg -d update -f` fixed it for me to. If this is a recurring problem, perhaps a bug should be reported?


----------

