Install last version of localhost w3c validator on debian / ubuntu

I tried to install w3c validator locally as explained by w3c site : http://validator.w3.org/source/#deb

As explained for debian, I ran “sudo apt-get install w3c-markup-validator”.
Then simply open a browser and go to : http://localhost/w3c-markup-validator

Problem is, latest available deb is version 7.4, and latest non-deb version is 8.5.1 !!!!

Here is how I did to quickly upgrade my version:

  1. download rpm file (they are up-to-date, contrary to .deb files) : http://rpmfind.net/linux/RPM/WByName.html and search for ‘w3c-markup-validator’
  2. once downloaded, convert it to .deb format : “sudo alien w3c-markup-validator-0.8.5-1.fc9.noarch.rpm”
    you may need to install ‘alien’ package for this to work (sudo apt-get install alien)
  3. now we need to manually edit apache w3c-validator configuration files:
    1. open /etc/apache2/conf.d/w3c-markup-validator.conf and replace the following line:
      "Alias /w3c-markup-validator /usr/share/w3c-markup-validator/html"

      with

      "Alias /w3c-markup-validator /usr/share/w3c-markup-validator/htdocs"
    2. also replace
      "ScriptAlias /w3c-markup-validator/check /usr/lib/cgi-bin/check"

      with

      "ScriptAlias /w3c-markup-validator/check /w3c-markup-validator /usr/share/w3c-markup-validator/cgi-bin/check"
  4. save your changes and restart apache (sudo /etc/init.d/apache2 restart)

That’s it.

If you open your browser and go back to http://localhost/w3c-validator-markup/, you should be running the latest version.

sources

10 Comments: Trackback URL | Comments RSS

  1. Peter Says:

    Should be:
    In 2.
    “ScriptAlias /w3c-markup-validator/check /usr/share/w3c-markup-validator/cgi-bin/check”

    and open browser to http://localhost/w3c-markup-validator/

  2. remy Says:

    well, thanks for this!

  3. Kevin Says:

    Hi,

    What package did you install to avoid this error?

    Can’t locate HTML/Encoding.pm in @INC (@INC contains: /etc/perl /usr/local/lib/perl/5.10.0 /usr/local/share/perl/5.10.0 /usr/lib/perl5 /usr/share/perl5 /usr/lib/perl/5.10 /usr/share/perl/5.10 /usr/local/lib/site_perl) at /usr/share/w3c-markup-validator/cgi-bin/check line 53.
    BEGIN failed–compilation aborted at /usr/share/w3c-markup-validator/cgi-bin/check line 53.

    Thanks,
    Kevin

  4. Spoko Says:

    Hi Guys

    I am running ubuntu 9.10 Desktop and I have successfully installed W3C-Validator using the steps on this link: (http://www.qc4blog.com/?p=621);

    I got this error when running http://localhost/w3c-markup-validator/

    Software error:

    Can’t locate HTML/Encoding.pm in @INC (@INC contains: /etc/perl /usr/local/lib/perl/5.10.0 /usr/local/share/perl/5.10.0 /usr/lib/perl5 /usr/share/perl5 /usr/lib/perl/5.10 /usr/share/perl/5.10 /usr/local/lib/site_perl) at /usr/share/w3c-markup-validator/cgi-bin/check line 53.
    BEGIN failed–compilation aborted at /usr/share/w3c-markup-validator/cgi-bin/check line 53.

    Can somebody help me
    Thanks

  5. Spoko Says:

    Hi Guys

    When running this (http://localhost/w3c-markup-validator/) on my browser I get this error. What did I do wrong.

    Software error:

    Can’t locate HTML/Encoding.pm in @INC (@INC contains: /etc/perl /usr/local/lib/perl/5.10.0 /usr/local/share/perl/5.10.0 /usr/lib/perl5 /usr/share/perl5 /usr/lib/perl/5.10 /usr/share/perl/5.10 /usr/local/lib/site_perl) at /usr/share/w3c-markup-validator/cgi-bin/check line 53.
    BEGIN failed–compilation aborted at /usr/share/w3c-markup-validator/cgi-bin/check line 53.

    For help, please send mail to the webmaster (webmaster@localhost), giving this error message and the time and date of the error.

  6. Olivier Berger Says:

    You may run cpan HTML::Encode to install the module… Hope this helps.

  7. w3cvalidation Says:

    Nice information, I really appreciate the way you presented.Thanks for sharing..

  8. Sebastien Says:

    Great information, I am however unable to get it to install correctly. I have the 0.7.4 version installed, I downloaded the RPM, aliened it to a .deb, double clicked on the deb and installed it. When I tried to access the localhost environment again it said that the files were not found. I tried pretty much everything I could think of to get it to work but it wouldn’t so I had to revert back to 0.7.4 version. I’m trying to set this up for my company, but it’s been giving me quite a few problems. :(

    Any suggestions?

  9. Free Stuff Says:

    One of the basic reasons why websites often do not pass the W3C validation check is due to the fact that there are several programs and scripts that are running on the web pages and many of them do not comply with the web standards.

  10. PL Says:

    Try:

    cpan install HTML:Encoding

Post a Comment

Your email is never published nor shared. You're allow to say what you want...

Powered by sweetCaptcha