[PYTHON] I have libncurses but get angry with pip install readline

The environment is CentOS6. I think it's almost the same for Debian / Ubuntu.

python


$ pip install readline
---Abbreviation---
/usr/bin/ld: cannot find -lncurses
---Abbreviation---

I was angry

$ locate libncurses
/lib64/libncurses.so.5
/lib64/libncurses.so.5.7
/lib64/libncursesw.so.5
/lib64/libncursesw.so.5.7

It became.

Cause

Without libncurses.so, ld doesn't seem to be able to find the library. libncurses.so.5 is no good. On the other hand, ld-linux.so and libdl dlopen are searched for including the version number, so all you need is libncurses.so.5. Reference

Countermeasures

If you have root, it's easy to include the develop package. If not

$ mkdir /tmp/test
$ ln -s /lib64/libncurses.so.5 libncurses.so
$ LDFLAGS=-L/tmp/test pip install readline

Supplement

There is no header because there is no devel package, but I can compile it for some reason. Does readline have a header? If you want the header, you can unzip it under your home directory like Previous post. Even if you don't have root, you can usually manage.

Recommended Posts

I have libncurses but get angry with pip install readline
I get an error when trying to install maec 4.0.1.0 with pip
I want to pip install with PythonAnywhere
I can't install the package with pip.
I can't install Dask with pip on Ubuntu
Error with pip install
Install scikit.learn with pip
I quarantined my environment with virtualenv, but I get a lot of packages with pip list
When moss with pip install
Install github repository with pip
I cried with `pip install --upgrade pip` with Bad md5 hash for package, but it got better
Insecure Platform Warning still appears with pip install, but I didn't do it because it was troublesome.
What to do if you get a UnicodeDecodeError with pip install
Read this if you get SSL related errors with pip install! !! !!
If you should have pip installed but get an Import error
Install Python 2.7.9 and Python 3.4.x with pip.
I can't install python3 with pyenv-vertualenv
Permission denied with pip install pyopenssl
I can't install mysql-connector-python with anaconda
Manipulate colors with pip install color
How to install mysql-connector with pip3
[Python Windows] pip install with Python version
I want to get angry with my mom when my memory is tight
I got an SSL related error with pip install, so I solved it
I get an error with import pandas.
SSL certificate related with pip install? Error
I was addicted to pip install mysqlclient
When I get an error with PyInstaller
Install by specifying the version with pip
scipy stumbles with pip install on python 2.7.8
I couldn't get out after upgrading pip
I just did pip install pyrebase ... (UnicodeDecodeError)
Let's install box2d-py with Windows 10 environment pip
Workaround if you get an error when trying to install PySide with pip
I failed to install django with pip, so a reminder of the solution
[Linux] You do not have root privileges. But I want to yum install.