SQLGetPrivateProfileString failed with - command-line

Typing the command: odbcinst -q -s on RHEL 6, I get the following error message:
odbcinst: SQLGetPrivateProfileString failed with .
All my DSN's are also not showing up when I run:
odbcinst -q -d

Type the command: env |grep 'ODBC' to check if the ODBCSYSINI and the ODBCINI variables are set. If no results are returned - you need to add the variables to the environment variable pointing to the directory and the path to where the odbc.ini file is located as follows (in my case for RHEL 6 it is located at /etc - others may have it on /usr/local/etc):
Edit ~\.bash_profile and add the following lines:
export ODBCSYSINI=/etc
export ODBCINI=/etc/odbc.ini
You are good to go!

In my case (ubuntu 16.04) it was related to this bug, just not ~/.odbc.ini but /etc/odbc.ini. Adding a line to /etc/odbc.ini
[empty-sys]
fixed the problem.

Its too late to answer on this question probably, but it is for those who still couldn't get this resolved using #kapil Vyas answer-
Adding to his answer, you will need to logout and then login again from your user for export commands (saved in .bash_profile) to work.

When I had this problem, I edited /usr/local/etc/odbcinst.ini to add:
[MySQL]
Description = ODBC for MySQL
Driver = /usr/lib/x86_64-linux-gnu/odbc/libmyodbc8a.so
Setup = /usr/lib/x86_64-linux-gnu/odbc/libodbcmyS.so
FileUsage = 1
Pooling = Yes
CPTimeout = 120
I hope this is helpful.

Related

openfoam ./makeParaview

i am currently building openfoam 1912 from source and have some trouble building paraview. I just build Qt and Cmake but as soon as i type ./makeParaview qt-5.9.9 5.6.3i get the following error:
./makeParaView: 64: local: -DWM_DP: bad variable name
./makeParaView: 64: ./makeParaView: -DOPENFOAM: bad variable name
A similar error occurs when i try to make VTK / Adios2. Any idea where i took the wrong turn?
Greetings
Gabbagandalf
The proper solution is related to shell quoting issues
- flag="$(stripCompilerFlags $flag)"
+ flag="$(stripCompilerFlags "$flag")"
but in the meantime you can simply change the shebang to #!/bin/bash - it is more forgiving.
As discussed and resolved in these GitLab ticket-1 and ticket-2:
The issue seems to be Ubuntu related.
Solution:
Prior to execute ./makeParaview, switch to bash:
Change the first line of makeParaView script to #!/bin/bash
sudo dpkg-reconfigure dash
./makeParaView

Error with static compilation Qt with postgresql driver

I have installed through Mainteinance Tool Qt 5.12.5 and the sources. I have the next directories:
C:\Qt\5.12.5\Src
C:\Qt\Tools\mingw730_32\
C:\Qt\Tools\mingw730_64\
On the other hand, I have read that downloable Postgres version is compiled with MSVC, and I must to compile my own version. I have do it following link, and now I have a postgresql version in c:\pgsql
Finally I have added c:\pgsql to user Path
Next step, I have opened PowerShell in Admin mode and I´ve gone to C:\Qt\5.12.5\Src\.
Next, set the env path for this PowerShell session:
$env:Path += ";C:\Qt\Tools\mingw730_64\bin\;C:\Qt\5.12.5\Src;C:\pgsql\include\;C:\pgsql\lib\;C:\pgsql\bin\" (setting the pgsql path again....)
After that, I execute configure.bat like that:
configure -v -static -release -static-runtime -platform win32-g++ -prefix C:\Qt\5.12.5\Estatico\ -opensource -confirm-license -qt-zlib -qt-pcre -qt-libpng -qt-libjpeg -qt-freetype -opengl desktop -no-openssl -opensource -confirm-license -skip webengine -make libs -nomake tools -nomake examples -nomake tests -sql-psql
But I have get this error:
ERROR: Feature 'sql-psql' was enabled, but the pre-condition 'libs.psql' failed.
Searching in config.log I can read those lines:
loaded result for library config.qtbase_sqldrivers.libraries.psql
Trying source 0 (type pkgConfig) of library psql ...
pkg-config use disabled globally.
=> source produced no result.
Trying source 1 (type psqlConfig) of library psql ...
pg_config not found.
=> source produced no result.
Trying source 2 (type psqlEnv) of library psql ...
None of [liblibpq.dll.a liblibpq.a libpq.dll.a libpq.a libpq.lib] found in [] and global paths.
=> source produced no result.
Trying source 3 (type psqlEnv) of library psql ...
=> source failed condition '!config.win32'.
test config.qtbase_sqldrivers.libraries.psql FAILED
What can I do or what is the properly way to do that?
Thank you in advance.
UPDATE
There are similar question here but it hasn´t been solved, and those question ask about Visual Studio.
I want to compile it under mingw.
The solution suggested by #Soheil Armin doesn´t work too
The solution suggested by #Soheil Armin works fine, but I need to delete the entire source tree and reinstall it as he suggested. If not, a new configure won't work.
Also, the ^ character can be saved:
configure <your parameters>
PSQL_LIBS="C:\pgsql\lib\libpq.a"
-I "C:\pgsql\include"
-L "C:\pgsql\lib"
You need to explicitly define library paths of Postgres.
configure <your parameters> ^
PSQL_LIBS="C:\pgsql\lib\libpq.a" ^
-I "C:\pgsql\include" ^
-L "C:\pgsql\lib"

Is it possible to export and import content between instalations?

Is there a way to export and import content from one sulu (1.6) installation to another? Let's say from a staging system to the production version?
Maybe the doctrine commands will help you.
!!! IMPORTANT !!!
THIS IS A FULL COPY WHICH DELETES EXISTING DATA FROM TARGET INSTALLATION
Export from Staging:
bin/adminconsole doctrine:phpcr:workspace:export -p /cmf cmf.xml
bin/websiteconsole doctrine:phpcr:workspace:export -p /cmf cmf_live.xml
bin/adminconsole doctrine:phpcr:workspace:export -p /jcr:versions jcr.xml
Delete everything in the target installation (in your case production):
bin/adminconsole doctrine:phpcr:node:remove /cmf
bin/websiteconsole doctrine:phpcr:node:remove /cmf
bin/adminconsole doctrine:phpcr:node:remove /jcr:versions
Import into the target installation:
bin/adminconsole doctrine:phpcr:workspace:import -p / cmf.xml
bin/websiteconsole doctrine:phpcr:workspace:import -p / cmf_live.xml
bin/adminconsole doctrine:phpcr:workspace:import -p / jcr.xml
Also don't forget to copy the database and your uploads folder (var/uploads/)
Sorry but this question is too unspecific and not really sulu related. So the base answer is "yes".
sulu itself doesn't contain a service for this. This is mostly because your data can be very different and you can't really write something agnostic that fits any use case.
Still you are using symfony and the PHPCR. Of course you can export to basically format and import again. But how to do that has to be implemented on your site.

Error in Glance_image[cirros] : change from absent to present failed: Command: ... has been running for more then 20 seconds

I am running packstack.
Error: /Stage[main]/Main/Glance_image[cirros]/ensure: change from
absent to pres
ent failed: Command: 'openstack ["image", "create", "--format",
"shell", ["cirros", "--public", "--container-format=bare", "--disk-format=qcow2", "--copy-from=http://download.cirros-cloud.net/0.3.4/cirros-0.3.4-x86_64-disk.img"]]' has been running for more then 20 seconds!
I am having this error, I can wget it though, so I can perfectly reach it. Can someone help me resolving this? As a workaround I tried it manually, but I am really new to centos and Openstack, so I don't know much. I tried :
openstack image create --format shell cirros --public --container-format=bare --disk-format=qcow2 --copy-from=http://download.cirros-cloud.net/0.3.4/cirros-0.3.4-x86_64-disk.img
I got Missing parameter(s):
Set a username with --os-username, OS_USERNAME, or auth.username Set
an authentication URL, with --os-auth-url, OS_AUTH_URL or
auth.auth_url Set a scope, such as a project or domain, set a project
scope with --os-project-
name, OS_PROJECT_NAME or auth.project_name, set a domain scope with
--os-domain-name, OS_DOMAIN_NAME or auth.domain_name
What should I add to the above command? Will it be able to solve my problem? If not what is the right way to solve the problem?
Solved it by replacing
--copy-from=http://download.cirros-cloud.net/0.3.4/cirros-0.3.4-x86_64-disk.img to point --copy-from=<local path>
But didn't got why the original command not working even when I can wget it.

Error in loading shared libraries

Hello all i am a student of bioinformatics and working on gromacs , while preparing for a simulation , i am getting this error
[root#compute-0-3 bin]# pdb2gmx -f model-317.pdb -water spce
pdb2gmx: error while loading shared libraries: libmpi.so.0: cannot open shared object file: No such file or directory**
How to solve this problem ??
You have to set the LD_LIBRARY_PATH you can check more on MPI - error loading shared libraries
Thanks & Regards,
Alok Thaker
I have found it useful to use strace -eopen COMMAND to see which files are actually searched for, and what return code open gives for each of them. For instance:
$ strace -eopen echo foo
open("/etc/ld.so.cache", O_RDONLY|O_CLOEXEC) = 3
open("/lib/x86_64-linux-gnu/libc.so.6", O_RDONLY|O_CLOEXEC) = 3
open("/usr/lib/locale/locale-archive", O_RDONLY|O_CLOEXEC) = 3
foo
Use this trick to verify if it is just the path that is set wrong.
Also libmpi.so.0 may not be properly installed. You might have the file libmpi.so.0.1.2.3, and you need to either run ldconfig or manually make a symlink from libmpi.so.0 to libmpi.so.0.1.2.3. See more about why shared libraries might have different numbers appended to them here: http://tldp.org/HOWTO/Program-Library-HOWTO/shared-libraries.html