Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pyq on 64-bit Centos 7 failes with Invalid ELF header #128

Closed
7 tasks
perfecto25 opened this issue Feb 27, 2020 · 2 comments
Closed
7 tasks

Pyq on 64-bit Centos 7 failes with Invalid ELF header #128

perfecto25 opened this issue Feb 27, 2020 · 2 comments
Labels
user error Error caused by end user

Comments

@perfecto25
Copy link

perfecto25 commented Feb 27, 2020

Questions

  • Which operating system are you using (if Linux, please provide flavour of it, i.e RedHat, CentOS or Ubuntu), is it 32-bit, or 64-bit?
centos 7 x64,     uname:  Linux qbreport-us1 3.10.0-1062.12.1.el7.x86_64 #1 SMP Tue Feb 4 23:02:59 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux

  • Which version of PyQ are you running? Please provide output of pyq --versions, if PyQ isn't operational, please provide Python interpreter version and PyQ version python -V; python3 -V; pip list | grep pyq:
    cannot run pyq, 

mreider@qbreport-us1:~ $ python -V
Python 2.7.5

mreider@qbreport-us1:~ $ python3 -V
Python 3.6.8

mreider@qbreport-us1:~ $ pip list | grep pyq
pyq        4.2.1  

  • Which version of kdb+ are you using, is it 32-bit or 64-bit?
    64 professional
  • If on 64-bit, is your QLIC set? Please provide output env | grep QLIC on linux
        mreider@qbreport-us1:~ $ env | grep QLIC
QLIC=/opt/qb/q3.6

  • Did you use virtual environment to install PyQ? If not, why?

    • no, need system wide pyq
  • Where is your QHOME? Please provide output env | grep QHOME on linux/macOS

    mreider@qbreport-us1:~ $ env | grep QHOME
     QHOME=/opt/qb/q3.6

  • Do you use Conda? If so, what version?
    no

Steps to reproduce the issue

install pyq

pip install pyq

chmod +x /usr/bin/pyq (pyq is not executable after pip installs it)

try running pyq,

 mreider@qbreport-us1:~ $ pyq
'2020.02.27T15:24:25.615 /usr/local/lib/libpython3.7m.a: invalid ELF header
  [4]  /opt/qb/q3.6/p.k:2: (`:./pyq 2:(`p_init;1)).pyq.python_dll
                                    ^

Expected result

pyq shell

Actual result

getting ELF error

'2020.02.27T15:24:25.615 /usr/local/lib/libpython3.7m.a: invalid ELF header
[4] /opt/qb/q3.6/p.k:2: (:./pyq 2:(p_init;1)).pyq.python_dll

Workaround

If you know workaround, please provide it here.

@perfecto25
Copy link
Author

I think I got it to work by uninstalling all versions of pyq (py2, py3, py3.6, py3.7, etc)

then reinstalling, copied the Q files from /usr/local/q (not sure what install this), to our default Q installation,

python3.6 -m pip install pyq
chmod +x /usr/local/bin/pyq

cp -R /usr/local/q/* /opt/qb/q3.6/

now pyq opens up a python shell correctly,

 root@qbreport-us1:q3.6 $ /usr/local/bin/pyq
Python 3.6.8 (default, Aug  7 2019, 17:28:10) 
[GCC 4.8.5 20150623 (Red Hat 4.8.5-39)] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> 
>>> 
>>> quit()

@sashkab
Copy link
Contributor

sashkab commented Feb 28, 2020

This is user error. pip is linked to python 3.7 /usr/local/lib/libpython3.7m.a, but user uses Python 3.6. Proper way to install is

python3.6 -mpip install pyq

And don't install PyQ as root user. This is not supported.

@sashkab sashkab closed this as completed Feb 28, 2020
@sashkab sashkab added the user error Error caused by end user label Feb 28, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
user error Error caused by end user
Projects
None yet
Development

No branches or pull requests

2 participants