# ImageMagick6-nox11 imagick for PHP and a headless server



## notserpmh2 (Sep 18, 2019)

Hi all,

I'm running a headless FreeBSD 11.3 server.  It's hosting several Wordpress sites along with other websites.  Wordpress likes to have the php73-pecl-imagick package installed, plus I often find it handy to use tools like mogrify to do a quick resize of a photo from the command line of the server itself.

The problem is that if I try to use pkg to install php73-percl-imagick, It wants to install all of these "dependencies"


```
New packages to be INSTALLED:
    php73-pecl-imagick: 3.4.4
    ImageMagick6-nox11: 6.9.10.50,1
    libraqm: 0.6.0
    harfbuzz: 2.5.3
    cairo: 1.16.0,2
    xorgproto: 2019.1
    libxcb: 1.13.1
    libXdmcp: 1.1.3
    libXau: 1.0.9
    libXrender: 0.9.10_2
    libX11: 1.6.8,1
    libXext: 1.3.4,1
    mesa-libs: 18.3.2_1
    libXxf86vm: 1.1.4_3
    libXfixes: 5.0.3_2
    libXdamage: 1.1.5
    wayland: 1.16.0_1
    libepoll-shim: 0.0.20190311
    libunwind: 20170615
    ghostscript9-agpl-base: 9.27_2
    cups: 2.2.12
    avahi-app: 0.7_2
    gnome_subr: 1.0
    libdaemon: 0.14_1
    dbus-glib: 0.110
    dbus: 1.12.12
    poppler-data: 0.4.9
    libwmf-nox11: 0.2.8.4_15
    libraw: 0.19.2
```

Even if I try to just install ImageMagick6-no11, it's still wanting to install things like cups, avahi-app, wayland, etc.   Would installing from ports be a better idea or is there any way to "signal" the package to not add all the extra X stuff and network/printing stuff?


----------



## SirDice (Sep 18, 2019)

It's probably ghostscript9-agpl-base that pulls in CUPS. Which in turn pulls in the X libraries and such. 

We use ImageMagick6-no11 too but I'm pulling everything in from a custom repository. So I don't have this long list of dependencies.



notserpmh2 said:


> is there any way to "signal" the package to not add all the extra X stuff and network/printing stuff?


That's something you can't do. Once the packages have been built you can't change any of its dependencies any more. The only way to change the dependencies is by building from ports. I can highly recommend setting up your own custom repository but that's probably a little overkill for a single server.


----------



## rigoletto@ (Sep 18, 2019)

This is because the packages are built against certain dependencies, and if you want to deviate you need to build from ports. This is not a good idea to mix pre-built packages with locally built ports, but in this particular case that should be safe.

That said, you can disable the X11 option on the graphics/pecl-imagick port and build it manually. However, be aware after every pecl-imagick update you will need to rebuild it with that option OFF, because the official repository has it with that option ON.

I particularly prefer to use ports-mgmt/poudriere and keep my own repository.


----------



## notserpmh2 (Sep 19, 2019)

Thanks for the replies.  I'll install it from ports for now and just a note in my documentation to disable X11 whenever I update it.


----------

