Why Don't These Apt-Packages Behave the Same on Ubuntu and Heroku

Why don't these apt-packages behave the same on Ubuntu and Heroku?

With the amazing help of @PadraicCunningham I managed to find the solution. The problem turned out to be that heroku-buildpack-apt installs things in a newly created folder /app/.apt/ which was not in the PYTHONPATH.

So I added the relevant folder to my PYTHONPATH on heroku as follows:

heroku config:add PYTHONPATH=/app/.apt/usr/lib/python2.7/dist-packages/

This solved the issue. Again a big thanks to PadraicCunningham for helping me to find this issue!

Why does APT keep saying the gcloud SDK doesnt exist?

Is the google cloud sdk in the $PATH?
type echo $PATH
If the sdk isn't in the path then it won't find it, it may be that your root user has a different path than the user you used to set up the sdk

hope that helps

Ansible apt task that both upgrades packages and removes unused packages

Ansible will not perform both actions in one step. In the example task from the question, the autoremove: yes option will be ignored.

  1. autoremove: yes is only parsed in the install and remove methods (performed with apt-get command)

  2. upgrade: safe causes Ansible to run aptitude command (and it doesn't have the --auto-remove option at all (and on top of that it's not even considered in the upgrade method)

How to install Python bindings originating from an apt package?

sudo apt-get install libzbar-dev
sudo pip install zbar

It is usually a -dev package that you are missing when you get those kind of errors, an easy way to find the package is apt-cache search like below:

~$ apt-cache search zbar
libbarcode-zbar-perl - bar code scanner and decoder (Perl bindings)
libzbar-dev - bar code scanner and decoder (development)
libzbar0 - bar code scanner and decoder (library)
libzbargtk-dev - bar code scanner and decoder (GTK+ bindings development)
libzbargtk0 - bar code scanner and decoder (GTK+ bindings)
libzbarqt-dev - bar code scanner and decoder (Qt bindings development)
libzbarqt0 - bar code scanner and decoder (Qt bindings)
python-qrtools - high level library for reading and generating QR codes
python-zbar - bar code scanner and decoder (Python bindings)
python-zbarpygtk - bar code scanner and decoder (PyGTK bindings)
zbar-dbg - bar code scanner and decoder (debug)
zbar-tools - bar code scanner and decoder (utilities)

FWIW, the procedure I used to install was python-qrtools ,libzbar-dev and finally pip install zbar.



Related Topics



Leave a reply



Submit