Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Chef installing uwsgi libiconv.so.2 no such file or directory

I am trying to setup a Django server with uwsgi. When installing just uwsgi using poise-python with the following recipe:

python_runtime '3'

python_package 'uwsgi' do
    python '3'
end

When I login to the machine and just run uwsgi without any options, it will throw an error:

uwsgi: error while loading shared libraries: libiconv.so.2: cannot open shared object file: No such file or directory

I checked the libraries and libiconv.so.2 was not installed as so:

sudo ldconfig -p | grep libiconv

However, when I reinstall it as follows:

sudo pip uninstall uwsgi
sudo pip install uwsgi

The uwsgi command works again. What is weird is that when I check if libiconv.so.2 is installed, it is still not installed.

How should I tell chef to install uwsgi properly without using execute to run the commands I did?

Note: I am using test kitchen and the virtual environment has been reset before running any commands. The os is debian 8.6.

like image 272
Moon Cheesez Avatar asked Dec 01 '22 12:12

Moon Cheesez


1 Answers

This works for me:

conda install -c conda-forge libiconv

ref: https://anaconda.org/conda-forge/libiconv

like image 118
Belter Avatar answered Dec 06 '22 11:12

Belter