4/18/2007
Up Yaws!
Getting yaws own Erlang web server running on Ubuntu Edgy Eft
I wanted to set up Yaws on my home Ubuntu box so that I could play around with ErlyWeb.
I started by installing the available Ubuntu package:
marc@tbird:~$ sudo aptitude install yaws
This installed just fine, but when I tried to run it, I ran into immediate trouble:
marc@tbird:~$ yaws -i ... Eshell V5.5.1 (abort with ^G) 1> exec: 1: setuid_drv: not found
A quick peek at the Yaws page suggested that this was a known problem that had been fixed recently. I guess Ubuntu hasn’t picked up the fix yet, at least in Edgy.
So I downloaded the source code and set about building it. The only hitch was that my first attempt failed with an error about a missing PAM header file.
gcc -c -g -O2 -I/usr/include/security -I"/usr/lib/erlang/usr/include" -I/usr/include/pam/ epam.c epam.c:2:22: error: pam_appl.h: No such file or directory
Strange that the configure script didn’t catch the missing header file, but I digress.
The missing pam_appl.h header file was easily remedied with:
marc@tbird:~/sw/yaws-1.68$ sudo aptitude install libpam0g-dev
Then it built just fine and I could install it to my home directory using:
marc@tbird:~/sw/yaws-1.68$ make local_install
Del.icio.us
Digg
Reddit
Technorati
Possibly related posts
Comments
Leave a reply




Thank you for your instructions.
I was getting desperate because i couldn’t get it run.
Now it seems like it is ok.
The problem was libpam0g-dev.
Regards
Sionne
Not impressive. First the above problem that should be caught in config. Then a first run interactive run bombs with a load of cryptic nonsense. It doesn’t matter if I run it as myself or as ‘yaw’ or even root althougd the second gives different errors. This was all on amd64 gutsy ubuntu btw.
samantha@bigU:~/work/yaws$ yaws -i
Erlang (BEAM) emulator version 5.5.5 [source] [64-bit] [async-threads:0] [kernel-poll:false]
Eshell V5.5.5 (abort with ^G)
1>
=INFO REPORT==== 13-Apr-2008::23:12:54 ===
Yaws: Using config file /etc/yaws/yaws.conf
=INFO REPORT==== 13-Apr-2008::23:12:54 ===
Yaws: Using subconfig file /etc/yaws/conf.d/yaws-wiki.conf
=INFO REPORT==== 13-Apr-2008::23:12:54 ===
Yaws: Using subconfig file /etc/yaws/conf.d/localhost-ssl.conf
=INFO REPORT==== 13-Apr-2008::23:12:54 ===
Yaws: Using subconfig file /etc/yaws/conf.d/localhost.conf
=ERROR REPORT==== 13-Apr-2008::23:12:54 ===
Cannot open “/var/log/yaws/localhost:8443.access”
=ERROR REPORT==== 13-Apr-2008::23:12:54 ===
Cannot open “/var/log/yaws/localhost:8080.access”
=ERROR REPORT==== 13-Apr-2008::23:12:54 ===
Cannot open /var/log/yaws/auth.log
yaws:Add path “/usr/lib/yaws/wiki/ebin”
yaws:Add path “/usr/lib/yaws/ebin”
yaws:Add path “/usr/lib/erlang/lib/yaws-1.68/examples/ebin”
yaws:Running with id=default
Running with debug checks turned on (slower server)
Logging to directory “/var/log/yaws”
=ERROR REPORT==== 13-Apr-2008::23:12:54 ===
Failed to create/manipulate the ctlfile
called /var/run/yaws/ctl-default
Either problems with permissions or earlier runs of yaws
with the same id as this, check dir for perms
None of Yaws ctl functions will work
=ERROR REPORT==== 13-Apr-2008::23:12:54 ===
Yaws: Failed to listen 0.0.0.0:8443 : {error,eaddrinuse}
=ERROR REPORT==== 13-Apr-2008::23:12:54 ===
Can’t listen to socket: {error,eaddrinuse}
=INFO REPORT==== 13-Apr-2008::23:12:54 ===
application: yaws
exited: {shutdown,{yaws_app,start,[normal,[]]}}
type: permanent
{”Kernel pid terminated”,application_controller,”{application_start_failure,yaws,{shutdown,{yaws_app,start,[normal,[]]}}}”}
Crash dump was written to: erl_crash.dump
Kernel pid terminated (application_controller) ({application_start_failure,yaws,{shutdown,{yaws_app,start,[normal,[]]}}})
OOPS. My fault. Seems an earlier synaptic install or something I had forgotten has yaws already up and running in daemon mode.
Thanks! That was helpful.