FreeBSD: The search target requires INDEX-9. Please run make index or make fetchindex

I am using make search name=foo command but getting the following error:

The search target requires INDEX-9. Please run make index or make fetchindex

How do I search ports tree under FreeBSD operating system and fix this issue?

Tutorial details
Difficulty Easy (rss)
Root privileges Yes
Requirements FreeBSD ports
Time N/A
You can search FreeBSD ports tree by changing to the /usr/ports directory and typing the following command:

make search name=string

To fix this issue you need to cd into /usr/ports directory. Open a terminal or ssh session and type the followign command as root user:

cd /usr/ports
make index


cd /usr/ports
make fetchindex

Sample outputs:

/usr/ports/INDEX-9.bz2                        100% of 1665 kB   54 kBps 00m00s

Now, try searching ports tree:
# make search name=apache
# make search name=lsof

Sample outputs:

Port:	lsof-4.87,8
Path:	/usr/ports/sysutils/lsof
Info:	Lists information about open files (similar to fstat(1))
Port:	p5-Unix-Lsof-0.0.5_1
Path:	/usr/ports/sysutils/p5-Unix-Lsof
Info:	Unix::Lsof -- a wrapper to the Unix lsof utility
B-deps:	p5-IPC-Run3-0.045 perl-5.14.2_2
R-deps:	p5-IPC-Run3-0.045 perl-5.14.2_2

🐧 Get the latest tutorials on Linux, Open Source & DevOps via RSS feed or Weekly email newsletter.

🐧 0 comments... add one

CategoryList of Unix and Linux commands
File Managementcat
FirewallAlpine Awall CentOS 8 OpenSUSE RHEL 8 Ubuntu 16.04 Ubuntu 18.04 Ubuntu 20.04
Network Utilitiesdig host ip nmap
OpenVPNCentOS 7 CentOS 8 Debian 10 Debian 8/9 Ubuntu 18.04 Ubuntu 20.04
Package Managerapk apt
Processes Managementbg chroot cron disown fg jobs killall kill pidof pstree pwdx time
Searchinggrep whereis which
User Informationgroups id lastcomm last lid/libuser-lid logname members users whoami who w
WireGuard VPNAlpine CentOS 8 Debian 10 Firewall Ubuntu 20.04
0 comments… add one

Leave a Reply

Your email address will not be published.

Use HTML <pre>...</pre> for code samples. Problem posting comment? Email me @