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 level Easy
Root privileges Yes
Requirements FreeBSD ports
Est. reading 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))
Maint:	ler@lerctr.org
WWW:	http://people.freebsd.org/~abe/
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
Maint:	gjvc@gjvc.com
B-deps:	p5-IPC-Run3-0.045 perl-5.14.2_2
R-deps:	p5-IPC-Run3-0.045 perl-5.14.2_2
WWW:	http://search.cpan.org/dist/Unix-Lsof/

🐧 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
Disk space analyzersdf ncdu pydf
File Managementcat cp mkdir tree
FirewallAlpine Awall CentOS 8 OpenSUSE RHEL 8 Ubuntu 16.04 Ubuntu 18.04 Ubuntu 20.04
Network UtilitiesNetHogs dig 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. Still have questions? Post it on our forum