# how do I know which of the ports installed in my system is using a specific port?



## mrjayviper (Aug 15, 2012)

I'm trying to compile qBittorrent 3.0 but it encountered an error. It seems I need to delete an installed port first before it can proceed. 

I can easily remove it but I want to know which port uses the problem port first before I proceed.

Thanks


----------



## lme@ (Aug 15, 2012)

`# pkg_info -R $portname`


----------



## SirDice (Aug 15, 2012)

You can easily get a list of installed ports/packages:
[cmd=]pkg_version -vI | less[/cmd]


----------



## mrjayviper (Aug 15, 2012)

Thanks! â˜ºâ˜º


----------



## setevoy (Aug 15, 2012)

And may be pkg_tree(7) ? Need install first.


----------



## Deleted member 9563 (Aug 16, 2012)

I'm interested in these answers as well, but seem to have a problem.


```
# pkg_tree
```
 works. As does

```
# pkg_info -R $portname
```
 when used with the full version numbers.

However,

```
pkg_version -vI | less
```
 returns

```
pkg_version: Unable to open /usr/ports/INDEX-9 in pkg_do.
```

What am I missing?


----------



## SirDice (Aug 16, 2012)

You don't seem to have an INDEX-9 file:

```
dice@molly:~> ll /usr/ports/INDEX-9 
-rw-r--r--  1 root  wheel  26819160 Aug  8 15:03 /usr/ports/INDEX-9
```

How do you update your ports tree? That file should be there.


----------



## Deleted member 9563 (Aug 17, 2012)

SirDice said:
			
		

> You don't seem to have an INDEX-9 file:
> 
> ```
> dice@molly:~> ll /usr/ports/INDEX-9
> ...



Thanks for the explanation. It's a (relatively) fresh install, and I haven't updated anything yet. I'll start another thread about that if I run into problems, but there seems to be good information posted on it.


----------



## SirDice (Aug 17, 2012)

If you already have a good ports tree but you're missing the INDEX-* file you can either fetch it or create it. The latter is recommended as that will create an INDEX from your current ports tree.

`# cd /usr/ports && make fetchindex`
`# cd /usr/ports && make index`


----------



## Deleted member 9563 (Aug 17, 2012)

Thanks SirDice. That worked and I can now execute the pkg_version(1) command you recommended. It had me worried though, because it took quite a long time to generate the index.


----------



## kpa (Aug 17, 2012)

Creating the INDEX takes a long time, you might want to stick to portsnap(8) that can fetch prebuilt descriptions for the ports and build the INDEX -files very quickly.

First time use:
`# portsnap fetch extract`

And from that on:
`# portsnap fetch update`


----------



## SirDice (Aug 17, 2012)

Yes, portsnap(8) should fetch the INDEX. That's why I asked how you update your ports tree 

I csup(1) mine so I always build my own. And yes, it takes a bit of time.


----------



## dougb@ (Aug 18, 2012)

mrjayviper said:
			
		

> I'm trying to compile qBittorrent 3.0 but it encountered an error. It seems I need to delete an installed port first before it can proceed.



Nice to hear that someone is actually using qbittorrent.  

Were you able to resolve your installation problem?


----------



## mrjayviper (Aug 19, 2012)

Oh yes. Sorry! Please close as resolved. â˜ºâ˜º


----------

