Upgrade Python SQlite3 module with SQlite binaries of Centos7 (local machine) - sqlite

After looking around for a while, I couldn't find an answer to my problem. In my Centos 7 machine I have an upgraded version of SQlite:
usr/bin/sqlite3
Now my Python still has the default installed version.
import sqlite3
sqlite3.sqlite_version
'3.7.17'
How can I upgrade it or change the path to the Centos binaries?
Thanks a lot!

Solved:
Instead of the binaries I took the full installation
Download latest sqlite3 from official site. (https://www.sqlite.org/download.html)
Unapack.
tar xvfz sqlite....tar.gz
Go to the unpacked dir. cd sqlite-....
./configure
make
make install
Now you successfully install updated sqlite3. Now fire this command sudo LD_RUN_PATH=/usr/local/lib ./configure --enable-optimizations
Open your activate file of virtual environment (e.g., venv/bin/activate) and add this line top of the file... export LD_LIBRARY_PATH="/usr/local/lib"

Related

Centos6 PHP7 Install SPL_Types

I am running CentOS 6 and am trying to install the SPL_Types extension for PHP7. I have php7 up and running however, any time I do pecl install SPL_Types,
I get massive compiler errors and can't find a way around. Ubuntu users can fix the issue by installing libpcre3-dev, but this is not a valid package on CentOS 6. I have verified that pcre and pcre-devel are installed and the latest version. Does anyone have a solution to this?
EDIT 1: A full log when I run the sudo pecl install SPL_Types command: http://pastebin.com/QG3mFjaf
I got it figured out. For those who wish to know, I had to use a third party source to compile and install the extension, then I had to edit my php.ini file manually to add the new module.
https://github.com/esminis/php_pecl_spl_types
then once you have it, run the commands:
phpize --clean
phpize
chmod +x configure
./configure --prefix=/usr
make install
Then, edit your php.ini file and under the dynamic modules section, add
extension=spl_types.so
Restart the httpd service by doing
sudo service httpd restart
Then verify the new module is loaded with phpinfo().

How to install wkhtmltopdf patched qt without compiling?

I'm using google cloud instance for host Odoo, somo reports print to pdf ok, but other with custom paperformat get the following error:
"The switch --header-spacing, is not support using unpatched qt, and will be ignored.The switch --header-html, is not support using unpatched qt, and will be ignored.The switch --footer-html, is not support using unpatched qt, and will be ignored.QXcbConnection: Could not connect to display"
I google it, and to solve I need to compile wkhtmltopdf like this:
http://www.grobak.net/id/blog/how-fix-wkhtmltopdf-failed-error-code-6 but this proccess need 3 hs and I'm building a script to install google instances on the run with odoo dependencies.
the .deb package have a dependency broken
Anyone know other solution?
My system configuration is Ubuntu 14.04 and 64 bit. So, i am downloading according to that.
First you have to check your system OS name by
lsb_release -a
Check to see if your Ubuntu Linux operating system architecture is 32-bit or 64-bit, open up a terminal and run the following command below.
file /sbin/init
Download wkhtmltopdf patched with qt using below command
sudo wget -P Downloads https://github.com/wkhtmltopdf/wkhtmltopdf/releases/download/0.12.1/wkhtmltox-0.12.1_linux-trusty-amd64.deb
Here, replace "trusty" with your OS name and if 64 bit only then keep "amd64" like that , otherwise change it to "i386" and down load the deb file.
After that execute the following commands,
cd ~/Downloads
sudo dpkg -i wkhtmltox-0.12.1_linux-trusty-amd64.deb
Now, check wkhtmltopdf version with below command,
wkhtmltopdf -V
Enjoy!!
After trying many ways I finally made it work.
First I removed all my previous installation by
sudo apt-get remove --purge wkhtmltopdf
sudo apt-get autoremove
Then I opened wkhtmltopdf.org and navigated into their Downloads > Archive. In Archive section I downloaded 0.12.1 .deb version by
wget <copy the link from website for the.deb file and paste it in terminal here>.
sudo dpkg -i <package name>
sudo cp /usr/local/bin/wkhtmltopdf /usr/bin
This is because odoo looks for wkhtmltopdf in /usr/bin directory otherwise gives IOError. I also set my webkit_path parameter in Odoo System Parameters to /usr/bin.
Thats it. Hope this helps
I was facing same issue with wkhtmltopdf 0.12.4
installed new version of wkhtmltopdf 0.12.6-1
follow below commands to install wkhtmltopdf 0.12.6-1
wget https://github.com/wkhtmltopdf/packaging/releases/download/0.12.6-1/wkhtmltox-0.12.6-1.centos7.x86_64.rpm
yum localinstall wkhtmltox-0.12.6-1.centos7.x86_64.rpm #centos specific command

Building SQLITE for the Nodewebkit (Using express.js)

I am having problems compiling SQLite for use with Nodewebkit. After research, it seems that I am having wrong versions of the programs. So I have:
- Node
- NW
- SQLite
Apparently there must be certain version of each of the mentioned programs to make it work.
What versions of the programs I must have, so I can run this command:
npm install sqlite3 --build-from-source --runtime=node-webkit --target_arch=ia32 --target=0.12.3
This link suggests I should have NW version 0.8.x. But I cant find it for download. Or maybe that is not the problem at all...
I build on Mac using node-webkit v0.12.3 using the following commands:
sudo npm install nw-gyp -g
npm install sqlite3 --build-from-source --runtime=node-webkit --target_arch=ia32 --target=0.12.3
First, make sure you installed nw-gyp globally. Then, run the command either in the directory containing node-webkit executables (nwjs), or in a subfolder of that folder.
Running the command should then create a node_modules folder in the same directory as the binaries, containing the sqlite3 module.

syslog-ng install finished without the needed files

I downloaded syslog-ng OSE from the site (version 3.4.0alpha3)
successfully run
./configure
make
make install
but I've got no /etc/syslog-ng.conf
nor /etc/init.d/syslog-ng
What might be the reason?
env is centos 6.3
This installs syslog-ng under /usr/local with your config as /usr/local/etc/syslog-ng.conf Please check./configure --help for options.
As far as I recall, there are init script examples in the source tree, but not automatically installed.

unable to update sqlite3 on mac osx?

i want to install newest sqlite3 on my mac osx. i am trying this from last 6 hours but still not succeed.Here are the steps i have followed.I have tried this site
mkdir ~/src
cd ~/src
curl http://www.sqlite.org/sqlite-3.6.18.tar.gz | tar zx
cd sqlite-3.6.18
autoconf
./configure --prefix=/usr/local
make
sudo make install
//check what version of SQLite is installed
sqlite3 --version
3.6.18
which sqlite3
/usr/local/bin/sqlite3
but it fails
but i manually downloaded the sqlite3 from the address below
http://www.sqlite.org/sqlite-amalgamation-3.6.22.tar.gz
and then tried the above scriot
the description of the above link is
A tarball containing the amalgamation together with an configure script and makefile for building it. This is the recommended source distribution for all Unix and Unix-like platforms.
and i have also downloaded the
Precompiled Binaries For Mac OS X
sqlite3-3.6.22-osx-x86.zip
A command-line program for accessing and modifying SQLite version 3.* databases. For x86 Macs running Leopard (OS 10.5) only.
but still i am unable to install.I have also read that modifying the default sqlite3 will cause some application stopped working because apple has a modified version of sqlite.
does some one knows how do i install the new sqlite3 and use that without removing the default one.I am not familiar with terminal commands.
ok here is an update
i have installed the sqlite in a new folder in /users/admin/sqlite3new
but when i run sqlite3 from terminal it shows older version...
also if i directly executes the bin file i am unable to open database is there any other way to open database?
Thanks
Macports ships a version of sqlite3 that will probably work perfectly fine (and it installs your dependencies automagically). Maybe that's an option for you?
Macports by default installs software in /opt so it will not remove the 'default' sqlite.

Resources