# Basic pkg question



## fullauto2012 (Dec 28, 2022)

I am reinstalling my system with some new configurations and am to the point where I am dropping in some basic packages to handle what I want this small server to do.
I plan on running:
Bind: so I can run a split horizon dns and manage some things from behind the firewall without resolve issues
Apache24, MySQL, Nextcloud, and Wordpress... 
My question is how can I check the pkg dependencies BEFORE downloading and installing them so I can avoid dependency conflicts?
I have been crawling all over the man pages and have yet to stumble on the answer...


----------



## Alain De Vos (Dec 28, 2022)

You will be prompted when the system wants to de-install packages, so you can ctrl-c to abort.
So just try to install them.


----------



## Erichans (Dec 28, 2022)

Try a "dry run", use pkg-install(8):

```
OPTIONS
[...]
     -n, --dry-run
		Dry-run	mode.  The list	of changes to packages is always
		printed, but no	changes	are actually made.
```

A few notes: there is pkg(7) that _is part_ of the FreeBSD base system and pkg(8) that _is *not* part_ of the FreeBSD base system. pkg(8) gets "bootstrapped" by the first use of pkg(7) (provided your system has internet access of course). 
Because `pkg` has several sub-commands, the subsequent man page will be found with `man pkg-<sub-command>`: `man pkg` does not contain "everything" about "every" pkg sub-command. For installing packages: `man pkg-install`. Also useful is the use of `pkg help` and `pkg help install` and the likes. That same man page structure with sub-commands is applied to other commands, for example with `man zfs` and `man zfs-create`.


----------



## VladiBG (Dec 28, 2022)

If you use only default versions of the pkg there will be no conflicts.

Here's the list of quarterly 2022q4 build: https://github.com/freebsd/freebsd-ports/blob/2022Q4/Mk/bsd.default-versions.mk
where you can lookup the default version which you can use. For example for PHP it's version 8.0 so all other pkg which depend of PHP are build against PHP8.0 if you want to use PHP8.1 you will need to switch from quarterly to latest or don't use pkg and build everything from ports.


----------

