Varnish plugin works well with CloudLinux server. But sometimes the compilation may fail with errors.
Its due to the absence of dependent packages in the server.
So please install the below necessary packages before starting varnish compilation.
You can install Varnish cache with out any issues now.