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

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 :)
 
You can easily get a list of installed ports/packages:
[cmd=]pkg_version -vI | less[/cmd]
 
I'm interested in these answers as well, but seem to have a problem.

Code:
# pkg_tree
works. As does
Code:
# pkg_info -R $portname
when used with the full version numbers.

However,
Code:
pkg_version -vI | less
returns
Code:
pkg_version: Unable to open /usr/ports/INDEX-9 in pkg_do.

What am I missing?
 
You don't seem to have an INDEX-9 file:
Code:
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.
 
SirDice said:
You don't seem to have an INDEX-9 file:
Code:
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.

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.
 
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
 
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.
 
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
 
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.
 
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?
 
Back
Top