# Missing pkg-descr



## mu (Jan 14, 2012)

I have a fresh installation of FreeBSD 9.  I installed the ports tree but I cannot install any ports.  Here are some examples of output:


```
===>  Building for xf86driproto-2.1.1
===>  Installing for xf86driproto-2.1.1
===>   Generating temporary packing list
** Missing pkg-descr for xf86driproto-2.1.1.
*** Error code 1

Stop in /usr/ports/x11/xf86driproto.
*** Error code 1

Stop in /usr/ports/x11-drivers/xf86-video-nouveau.
```


```
/usr/ports/x11/mrxvt-devel # make install
===>  Installing for mrxvt-devel-0.5.4_6
===>   mrxvt-devel-0.5.4_6 depends on file: 
/usr/local/libdata/pkgconfig/x11.pc
- found
===>   mrxvt-devel-0.5.4_6 depends on shared library: jpeg.11 - found
===>   mrxvt-devel-0.5.4_6 depends on shared library: png.6 - found
===>   Generating temporary packing list
** Missing pkg-descr for mrxvt-devel-0.5.4_6.
*** Error code 1

Stop in /usr/ports/x11/mrxvt-devel.
*** Error code 1

Stop in /usr/ports/x11/mrxvt-devel.
```

After that, I ran:

```
# portsnap fetch
# portsnap extract
# portsnap update
```

That made no difference.

portupgrade didn't fare any better.

Any suggestions?  Thanks.


----------



## mu (Jan 14, 2012)

I should have mentioned of course the pkg-descr files are all present.  For instance:

```
/usr/ports/x11/mrxvt-devel # ls
Makefile   distinfo   files/     pkg-descr  pkg-plist  work/
```


----------



## hadrons123 (Jan 14, 2012)

You can try pkg_add for the packages you want to install.


----------



## mu (Jan 14, 2012)

True, and pkg_add is working so it is not a network issue.  But  many ports, like lame, cannot be installed by pkg_add.


----------



## wblock@ (Jan 14, 2012)

I have never seen that error before.  It's coming from /usr/ports/Mk/bsd.port.mk, which just does a -f test on the file.  Are you trying to install these with some non-root thing like sudo?  What are the permissions on /usr/ports/x11/mrxvt-devel/pkg-descr?  Is it on a network mount or some strange filesystem?


----------



## mu (Jan 14, 2012)

No, not trying to use sudo.  Problem persists with both logging in as root or suing to it.


```
/usr/ports/x11/mrxvt-devel # ls -lt
total 24
drwxr-xr-x  3 root  wheel   512 Jan 14 06:58 work/
drwxr-xr-x  2 root  wheel   512 Jan 14 06:51 files/
-rw-r--r--  1 root  wheel   500 Oct 23 23:17 pkg-descr
-rw-r--r--  1 root  wheel  4039 Jun 21  2011 Makefile
-rw-r--r--  1 root  wheel   130 Mar 19  2011 distinfo
-rw-r--r--  1 root  wheel   802 Jul  9  2008 pkg-plist
```

No, it is not a network mount or some strange filesystem.  However, during installation I chose manual partitioning, and used an MBR table.  The partitions are formatted as in the current handbook.  I have separate /var /tmp and /usr and they are all formatted with ufs.  Could that be the problem?


----------



## wblock@ (Jan 14, 2012)

mu said:
			
		

> No, it is not a network mount or some strange filesystem.  However, during installation I chose manual partitioning, and used an MBR table.  The partitions are formatted as in the current handbook.  I have separate /var /tmp and /usr and they are all formatted with ufs.  Could that be the problem?



Partitioning should not cause a problem.  Which shell are you using?


----------



## ondra_knezour (Jan 14, 2012)

What about your enviroment variables?

Check http://lists.freebsd.org/pipermail/freebsd-ports/2006-December/037566.html and http://unix.derkeiler.com/Mailing-Lists/FreeBSD/questions/2008-04/msg01426.html for examples what can be wrong.


----------



## mu (Jan 14, 2012)

Okay I have now installed lame, as a test case, using ports. You asked what shell I was using. It was, and is bash. But your question led me to go back to sh, and then lame installed. So then I deleted lame, went back to bash, and started deleted lines in my /root/.bashrc and and found these were the culprits:


```
export PKGDIR=/var/cache/pkg/
alias pkg_add='pkg_add -K'
```

Those work fine for caching packages installed with pkg_add, but apparently they somehow interfere with using the ports tree in FreeBSD-9.0. Those lines didn't mess up ports in FreeBSD 8.2, that I'm absolutely sure about. Thanks for your help!


----------



## Beeblebrox (Nov 29, 2012)

I just ran into this error while trying to install ports-mgmt/pkg inside one of my jails. The error source turned out to be PKGDIR environment setting.
`# unsetenv PKGDIR`
Did the trick.


----------

