Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I want to import std; and do some std.syslog. However, when I restart varnish, the VCC compiler fails:

$ sudo service varnish restart
 * Stopping HTTP accelerator varnishd                                [ OK ] 
 * Starting HTTP accelerator varnishd                                [fail] 
SMA.s0: max size 2048 MB.
Message from VCC-compiler:
Could not load module std
        /usr/lib/varnish/vmods/ cannot open shared object file: No such file or directory
('input' Line 15 Pos 8)
import std;

Running VCC-compiler failed, exit 1

VCL compilation failed

I'm running Ubuntu 11.10 and my varnish version:

$ varnishd -V
varnishd (varnish-3.0.0 revision cbf1284)
Copyright (c) 2006 Verdens Gang AS
Copyright (c) 2006-2011 Varnish Software AS

Isn't std a built-in VMOD? How can I solve this? Thanks.

UPDATE: I managed to upgrade Varnish to 3.0.3 by following the instructions on their official website. However, I still don't understand why std is not there in 3.0.0.

share|improve this question

Download the latest source version 3.0.3 of Varnish and compile it. After installing, locate to confirm that this module is also installed. Then you can start the varnish to check it with your new vcl with import std;. For debugging you can add -d -d option in the varnish startup defaults in file /etc/default/varnish. Check man vmod_std for more detail on varnish standard module. It is working fine for me for this version.

Installation by default put the vcl file under /usr/local/etc/varnish and binaries under /usr/local/bin/varnish* and varnishd can be found in /usr/bin/. You need to change the following in the init.d startup file /etc/init.d/varnish because it is different from the installation by apt-get.


Also change the vcl file path in the /etc/default/varnish like

-f /usr/local/etc/varnish/default.vcl

Now, you should be able to start and stop the newly compiled varnish like you used varnish installed via apt-get.

share|improve this answer
Will self-compiled version works seamlessly with Ubuntu? Since I have already installed Varnish through apt-get, I'm afraid something will be broken. – Xiao Jia Jan 2 '13 at 6:02
Yes it will work seamlessly as I am using it too. Just remove the varnish with apt-get remove varnish before compiling it. Compilation is pretty standard. You just need to follow the step mentioned in the documentation. – Somesh Jan 2 '13 at 6:15
Thanks for your reply. Can I let the compiled varnish take over the apt-get one, so that my service will not be interrupt? – Xiao Jia Jan 2 '13 at 7:05

Can you please upgrade your varnish on your machine with this command:

aptitude upgrade varnish

It should fix the problem. If not, please comment and will try to find some other fix.

share|improve this answer
Cannot upgrade it in this way. I'm running Ubuntu 11.10 so I suppose 3.0.0 is the latest version in the repository. – Xiao Jia Jan 2 '13 at 9:27

I finally managed to upgrade Varnish to 3.0.3 by following the instructions on the official website:

To use the repository, do the following

  1. curl | sudo apt-key add -
  2. echo "deb lucid varnish-3.0" | sudo tee -a /etc/apt/sources.list
  3. sudo apt-get update
  4. sudo apt-get install varnish

They only provide packages for Ubuntu's LTS releases, not all the intermediate releases. So it says lucid but works fine with oneric (11.10).

After upgrading Varnish to 3.0.3, I can sudo service varnish reload and import std; works fine now.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.