Tuesday 7 July 2015

HHVM Failed to open /var/www/.hhvm.hhbc

Hi if you get error Like Below

Failed to initialize central HHBC repository:\n  Failed to initialize schema in /var/run/hhvm/hhvm.hhbc: RepoQuery::step(repo=0x7f814678e600) error: 'CREATE TABLE main.UnitSourceLoc_6ba408ef27e1fc7820c8bd6352989f40c1acb812(unitSn INTEGER, pastOffset INTEGER, line0 INTEGER, char0 INTEGER, line1 INTEGER, char1 INTEGER, PRIMARY KEY (unitSn, pastOffset));' --> (13) database or disk is full\n  Failed to open /var/www/.hhvm.hhbc: 14 - unable to open database file\n
 

Failed to initialize central HHBC repository:\n  Failed to initialize schema in /var/run/hhvm/hhvm.hhbc: RepoQuery::step(repo=0x7fdf7b38e600) error: 'CREATE TABLE main.UnitSourceLoc_6ba408ef27e1fc7820c8bd6352989f40c1acb812(unitSn INTEGER, pastOffset INTEGER, line0 INTEGER, char0 INTEGER, line1 INTEGER, char1 INTEGER, PRIMARY KEY (unitSn, pastOffset));' --> (13) database or disk is full\n  Failed to open /var/www/.hhvm.hhbc: 14 - unable to open database file\n

Solution
create /var/www folder
and change owner to www-data
in /var folder run below commands
mkdir www
chown www-data:www-data www
Read More

Thursday 19 February 2015

How to Install Scrapy in Linux with out Any Errors

While installing Scrapy (Python Crawl) you may get errors like below

1. src/lxml/lxml.etree.c:16:20: fatal error: Python.h: No such file or directory
    #include "Python.h"

2. Setup script exited with error: command 'gcc' failed with exit status 1

3. fatal error: openssl/aes.h: No such file or directory
    #include <openssl/aes.h>


4. c/_cffi_backend.c:13:17: fatal error: ffi.h: No such file or directory
    #include <ffi.h>

Above errors are problems of dependences while installing Scrapy

to avoid these error you need to install following packages (assuming you already have python2 and python3)

Note : based on distribution some times -devel work otherwise try -dev
example if python3-devel error then try python3-dev

install gcc
install python-devel
install python3-devel
install libevent-devel
install python3-setuptools (Optional)
install python-setuptools
install openssl
install libxslt-devel (if libxslt-devel error then try libxslt1-devel)
install libxml2-devel
install libffi-devel
install libssl-dev (if libssl-dev error then try openssl-devel)

Finally to install Scrapy
easy_install scrapy




Read More
Here We Write The Problems we face at different situations and Solutions to those problems.