Install a linux package on heroku - heroku

I need to install this package on heroku
apt-get install python3-tk
Can someone tell me how can I install this? I tried above command but I get this message
Reading package lists... Done
Building dependency tree
Reading state information... Done
Package python3-tk is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source
W: Not using locking for read only lock file /var/lib/dpkg/lock
E: Package 'python3-tk' has no installation candidate

Installing apt packages requires sudo, which heroku doesn't allow you to do with slugs.
You can use this buildpack: https://github.com/heroku/heroku-buildpack-apt
Or you can use the heroku docker support to push docker images. Those images won't allow you sudo either. But you will be able to use sudo when building them.
See https://devcenter.heroku.com/articles/container-registry-and-runtime
If you still want to use buildpacks with docker and an easier way to install packages, there is also heroku.yml in developer preview:
https://devcenter.heroku.com/articles/heroku-yml-build-manifest

Related

How can I install dask[complete] manually?

I want to use the package "Dask", but there is one problem.
"Dask dataframe requirements are not installed."
Obviously, we can use pip install "dask[dataframe]" or pip install "dask[complete]".
However, in the secured server where I work, there is no internet connection.
So, I transfer the file of package and install manually.
But, I cannot find the package dask[dataframe] for downloading.
How can I install the rest of packages manually without internet connection?
Thank you
You should look at the setup.py requirements file in the dask repository to see which dependencies it requires.

How do I install mdbtools on an EC2 instance?

To install mdbtools on an EC2 instance I entered the following:
curl http://download-ib01.fedoraproject.org/pub/epel/7/x86_64/Packages/m/mdbtools-0.7.1-3.el7.x86_64.rpm > mdbtools-0.7.1-3.el7.x86_64.rpm
rpm -Uvh mdbtools-0.7.1-3.el7.x86_64.rpm
yum -q install mdbtools -y
but I get the following
error: Failed dependencies:
libmdb.so.2()(64bit) is needed by mdbtools-0.7.1-3.el7.x86_64
libmdbsql.so.2()(64bit) is needed by mdbtools-0.7.1-3.el7.x86_64
mdbtools-libs = 0.7.1-3.el7 is needed by mdbtools-0.7.1-3.el7.x86_64
I have no idea how to fix these on EC2.
Any suggestions?
You're fetching a single package directly, then attempting to install it.
The package has a bunch of dependencies that can't be satisfied when it is taken outside a repository context.
What you should do, is install the EPEL repository configuration as detailed here.
Then let yum install the package while picking up whichever dependencies required:
yum install mdbtools
If for whatever reason, you want to install things without EPEL repository being configured, you will have one fun time fetching all the dependencies, which depends on a particular package :)
In this particular case you need at least mdbtools-libs, which direct URL is https://download-ib01.fedoraproject.org/pub/epel/7/x86_64/Packages/m/mdbtools-libs-0.7.1-3.el7.x86_64.rpm

Error: unable to locate package libpam-google-authenticator

I'm having trouble setting up 2 factor authentication in Ubuntu Server 18.04.
I'm following this tutorial: http://www.ubuntuboss.com/how-to-set-up-2-factor-authentication-in-ubuntu-server-18-04/
But on the first step when I try to install the package I get the package not found error as seen in the title.
sudo apt-get install libpam-google-authenticator
I have looked around to see if the package has been updated and goes by a different name and I am sure I have the most recent version of the package manager.
Has the package changed or is there anyway around this problem.
Had the same problem. Turned out it's because Ubuntu Server doesn't include the Universe Repository.
Add this line
sudo add-apt-repository universe
Then run the command again and it will install.
I found a way round this issue,
/tmp$ wget http://launchpadlibrarian.net/326531917/libpam-google-authenticator_20170702-1_amd64.deb
I was able to manually install it via this link and installed the missing dependencies the same way and was able to finish the tutorial as normal.

How do I remove broken packages from Ubuntu while trying to install unity tweak tool

sudo apt-get install unity-tweak-tool
Reading package lists... Done
Building dependency tree
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:
The following packages have unmet dependencies:
unity-tweak-tool : Depends: unity-webapps-common but it is not going
to be installed
E: Unable to correct problems, you have held broken packages.
When I try to run the command at the top it gives me this. I've tried autoclean among many other things. Does anybody have any ideas?

Is there a durable store for deb files (like a maven repo?)

I have a maven built docker image that was dependent on libssl1.0.2_1.0.2d-3_amd64.deb, but this has now a 404 and has been replaced by libssl1.0.2_1.0.2e-1_amd64.deb.
This is a problem because maven builds are meant to be durable - ie you can rebuild them at any point in the future. The main maven repo is durable, so artefacts taken from that will be there in the future. I could move the debs I need into the maven repo, but that is a bit of abuse of other peoples storage...
So is there a durable store of debian files that is guaranteed to exist... well at least until the revolution/meteor strike/Jurassic resurrection etc.
You can do this yourself with free, open-source tools. You can create your own APT repository for storing Debian packages. If you are interested in using GPG signature to sign repository metadata read this.
Once you've created the repository, you can create a configuration file in /etc/apt/sources.list.d/ pointing to your repository. You can run apt-get update to refresh your systems apt cache, and then run apt-get install to install the package of your choice.
BTW, you can install a particular version of a package by running: apt-get install packagename=version.
For example, to install version 1.0 of "test", run: apt-get install test=1.0.
Alternatively, if you don't want to deal with any of this yourself you can just use packagecloud.io for hosting Debian, RPM, RubyGem, and Python PyPI repositories. A lot of people who use our service have your exact use case, where Debian packages they depend on disappear from public repositories so they upload them to us.

Resources