# pkg2ng used but still show pkg: fopen errors



## ProServ (Mar 19, 2014)

Hi,
In root nightly mail, there are entries such as:

```
pkg: fopen(/usr/local/share/doc/arj/arjs.txt): No such file or directory
arj-3.10.22_4: /usr/local/share/doc/arj/arjs.txt
pkg: fopen(/usr/local/share/doc/arj/debug.txt): No such file or directory
arj-3.10.22_4: /usr/local/share/doc/arj/debug.txt
pkg: fopen(/usr/local/share/doc/arj/history.txt): No such file or directory
arj-3.10.22_4: /usr/local/share/doc/arj/history.txt
pkg: fopen(/usr/local/share/doc/arj/readme.txt): No such file or directory
arj-3.10.22_4: /usr/local/share/doc/arj/readme.txt
pkg: fopen(/usr/local/share/doc/arj/unix.txt): No such file or directory
```

pkg2ng was run a few times trying to get rid of the above but to no avail. After reading other postings in the forum, and checking with


```
pkg info
```
  shows all the installed packages:


```
pciids-20140206                Database of all known IDs used in PCI devices
pcre-8.34                      Perl Compatible Regular Expressions library
pixman-0.32.4                  Low-level pixel manipulation library
pkg-1.2.6                      New generation package manager
pkgconf-0.9.4                  Utility to help to configure compiler and linker flags
plotutils-2.6_3,1              Plotting library and toolkit
```

deleted all the entries in /var/db/pkg except the two below:


```
local.sqlite    vuln.xml
```


What else can be done to *stop getting* the pkg: fopen entries in root email?

Thanks.


----------



## SirDice (Mar 19, 2014)

Re-install archivers/arj. The files belong to that port/package but it doesn't appear to be installed.


----------



## ProServ (Mar 19, 2014)

Hi,
Installed it then ran pkg2ng again....

```
# pkg2ng 
Converting packages from /var/db/pkg
Converting arj-3.10.22_4...
pkg: Unable to open plist file: %s(/var/db/pkg/arj-3.10.22_4/+CONTENTS): No such file or directory
Skipping invalid package: /var/db/pkg/arj-3.10.22_4
pkg: fstat() failed for(/usr/local/bin/arc): No such file or directory
pkg: fstat() failed for(/usr/local/bin/marc): No such file or directory

# cat /var/db/pkg/arj-3.10.22_4/distfiles 
# Added by portmaster
DISTFILE:arj-3.10.22.tar.gz:SIZE=431467:SHA256=589e4c9bccc8669e7b6d8d6fcd64e01f6a2c21fe10aad56a83304ecc3b96a7db
```


----------



## SirDice (Mar 19, 2014)

Are you on, or did you migrate from, FreeBSD 9.x? If you're on 9.x you must add WITH_PKGNG=YES to /etc/make.conf. After that any port that installs will register correctly with PKGNG. There should not be a need to run pkg2ng after the initial migration.


----------



## ProServ (Mar 19, 2014)

Hi Sir Dice,
8.4-p7


----------



## junovitch@ (Mar 22, 2014)

Same WITH_PKGNG=YES is required in /etc/make.conf for 8.4.  It's only default on 10.0+.


----------



## ProServ (Mar 24, 2014)

Currently and has been since installing pkg, make.conf has:

```
WITH_PKGNG=yes
NO_WARNING_PKG_INSTALL_EOL=yes
```


----------



## wblock@ (Mar 24, 2014)

Don't run pkg2ng again.  It does not add to but overwrites the package database.


----------

