# Unable to create local database! *** Error code 74 - portmas



## c00kie (Jan 1, 2013)

hi

On a clean base system with no ports installed and ports tree up-to-date; I'm trying to install portmaster.

/usr/ports/ports-mgmt/portmaster

`# make install clean`

```
===>  License BSD accepted by the user
===>  Found saved configuration for portmaster-3.14_8
===>   portmaster-3.14_8 depends on file: /usr/local/sbin/pkg - not found
===>    Verifying install for /usr/local/sbin/pkg in /usr/ports/ports-mgmt/pkg
===>  Installing for pkg-1.0.4_1
===>   Generating temporary packing list
===>  Checking if ports-mgmt/pkg already installed
Unable to create local database!
*** Error code 74

Stop in /usr/ports/ports-mgmt/pkg.
*** Error code 1

Stop in /usr/ports/ports-mgmt/portmaster.
*** Error code 1

Stop in /usr/ports/ports-mgmt/portmaster.
```

Where is my local database and how do I create it? And, how do I resolve *** Error code 1?


----------



## wblock@ (Jan 1, 2013)

Did you realize you were switching to pkgng?


----------



## c00kie (Jan 1, 2013)

wblock@ said:
			
		

> Did you realize you were switching to pkgng?



And from freebsd.org/pkgng



> about
> 
> What it is not
> 
> ...



However, it doesn't get any easier for me:

`# cd /usr/ports/ports-mgmt/portupgrade && make install clean`

```
===>  License BSD accepted by the user
===>  Found saved configuration for portupgrade-2.4.10.3,2
===>   portupgrade-2.4.10.3,2 depends on file: /usr/local/sbin/pkg - not found
===>    Verifying install for /usr/local/sbin/pkg in /usr/ports/ports-mgmt/pkg
===>  Installing for pkg-1.0.4_1
===>   Generating temporary packing list
===>  Checking if ports-mgmt/pkg already installed
Unable to create local database!
*** Error code 74

Stop in /usr/ports/ports-mgmt/pkg.
*** Error code 1

Stop in /usr/ports/ports-mgmt/portupgrade.
*** Error code 1

Stop in /usr/ports/ports-mgmt/portupgrade.
```

Hmm, what type of witchcraft is this? :\


----------



## wblock@ (Jan 1, 2013)

The point of the question was that to switch to pkgng requires running /usr/sbin/pkg.  And adding some entries to /etc/make.conf.  Which all must be done as root.


----------



## c00kie (Jan 1, 2013)

wblock@ said:
			
		

> The point of the question was that to switch to pkgng requires running /usr/sbin/pkg.  And adding some entries to /etc/make.conf.  Which all must be done as root.



Thanks

I'm looking around the net for answers but am unsuccessful:

`# cd /usr/ports/ports-mgmt/pkg && make install clean`

```
===>  Installing for pkg-1.0.4_1
===>   Generating temporary packing list
===>  Checking if ports-mgmt/pkg already installed
Unable to create local database!
*** Error code 74
```


`# cat /etc/make.conf`

```
SENDMAIL_CF_DIR= /usr/local/share/sendmail/cf
WITH_PKGNG=yes
WITH_PKGNG=yes
WITH_PKGNG=yes
```

Also, how do I run /usr/sbin/pkg?


----------



## wblock@ (Jan 1, 2013)

I'm still not sure if you intended to switch to pkgng or not.  If you were, see http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/pkgng-intro.html.


----------



## c00kie (Jan 1, 2013)

wblock@ said:
			
		

> I'm still not sure if you intended to switch to pkgng or not.  If you were, see http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/pkgng-intro.html.



Thanks.

Can I prod you again. In you're opinion. What's the best or simplest (pkgng or portupgrade) for a total novice; who just wants an easy to maintain web server?


----------



## wblock@ (Jan 1, 2013)

pkgng is just a new binary package management system.  It does not compare to portupgrade or portmaster, which are tools for upgrading existing applications and both work with either the old package system or pkgng.

The question to ask is whether you want to use binary packages that someone else has installed, or ports that are compiled from source.


----------



## SirDice (Jan 2, 2013)

c00kie said:
			
		

> `# cd /usr/ports/ports-mgmt/pkg && make install clean`
> 
> ```
> ===>  Installing for pkg-1.0.4_1
> ...


You need to add these _after_ you installed ports-mgmt/pkg. And once is more than enough.


----------



## c00kie (Jan 2, 2013)

Well up until this point I wasn't able to install any port. I kept getting an error 


```
Unable to create local database!
*** Error code 74
```

But after removing all lines from /etc/make.conf so it's now effectively just an empty file. I can successfully install ports with 

`# make install clean`

Thankyou moderators for all your patience and the tips and help.


----------

