# Getting error while installing packages



## Aman Tayal (May 19, 2021)

Hello Everyone,

After running the command: portmaster -d java/openjdk8 www/tomcat9 devel/aegis devel/cook devel/fhist
I am getting the following error: 




Can anyone please help me to resolve it.

Thanks in advance


----------



## SirDice (May 19, 2021)

Aman Tayal said:


> `portmaster -d java/openjdk8 www/tomcat9 devel/aegis devel/cook devel/fhist`


This doesn't install _packages_, this installs ports. I know that's confusing for new users but it's imperative to know the difference. 

And please don't post pictures of _text_, just copy/paste the _text_, pictures are impossible to quote from. Besides that, the picture cuts off the important information. But I can infer that sysutils/lsof fails to build because you don't have the FreeBSD sources installed in /usr/src, it needs them for certain kernel structures it uses. 

But I strongly suggest to actually use _packages_; `pkg install openjdk8 tomcat9 aegis cook fhist`


----------



## Aman Tayal (May 19, 2021)

SirDice said:


> This doesn't install _packages_, this installs ports. I know that's confusing for new users but it's imperative to know the difference.
> 
> And please don't post pictures of _text_, just copy/paste the _text_, pictures are impossible to quote from. Besides that, the picture cuts off the important information. But I can infer that sysutils/lsof fails to build because you don't have the FreeBSD sources installed in /usr/src, it needs them for certain kernel structures it uses.
> 
> But I strongly suggest to actually use _packages_; `pkg install openjdk8 tomcat9 aegis cook fhist`


Is there any difference if installation done using "pkg install openjdk8 tomcat9 aegis cook fhist" instead of "portmaster -d java/openjdk8 www/tomcat9 devel/aegis devel/cook devel/fhist" ?


----------



## SirDice (May 19, 2021)

Ports require a lot of build time and may use a lot of resources doing so. Packages are pre-built, no building required, no build dependencies, just download, install and done. It's the difference between a couple of minutes work or a few hours. If you don't change options or change any defaults then there's nothing to gain by building from ports.


----------

