dnf can't find package installed by automake - automake

I have built and installed several packages via automake (autogen,configure,make, make install).
All succeed, and run fine. But dnf doesn't see that any of these packages are installed. The make install creates and copies all of the .pc files correctly to /usr/local/lib/pkgconfig, and pkg-config --exists <my app> returns 0, but dnf list installed <my app> says no matching packages to list.
Any ideas/suggestions?

Yum (and dnf) keeps a list of installed rpm packages, NOT installed execuables or tarballs.
pkg-config doesnt care if the .pc files cames from an installed rpm package or from compiling a tarball - as long as the .pc files are in correct search path.
So, for yum or dnf to know it was a rpm installed, you must create an rpm. Some source tarballs contain a .spec file in them to help rpms. In te case you may be able to build an rpm by running
rpmbuild -tb thetarballpackage.tar.gz
(or similar) However, you also then run the risk of creatings (and then installing a rpm that may cause conflicts when attempting to install or update other rpms.

Related

Can't install apertium language packages from source - make command shows errors

I am trying to install apertium-eng-ita package from source (available at https://github.com/apertium/apertium-eng-ita). The system is debian 11 (i tried also on fresh ubuntu, get the same error). So i downloaded all the files into my /root directory (/root/eng-ita contents all the files from provided link) and run:
./autogen.sh
This generated all the necessary files inside the "eng-ita" folder, including "Makefile". But then i run:
make
and see errors like:
apertium-validate-dictionary apertium-eng-ita.eng-ita.dix /bin/bash:
apertium-validate-dictionary: command not found make: ***
[Makefile:769: eng-ita.autobil.bin] Error 127
I began googling (for example, here is some info - https://wiki.apertium.org/wiki/Installation_troubleshooting) this 127 error and found some information about PATH, but where i can put this PATH to make it work?
If you're installing from source, you should first add the apt source and install apertium-all-dev which will give you make etc. Cf. https://wiki.apertium.org/wiki/Prerequisites_for_Debian you should
curl -sS https://apertium.projectjj.com/apt/install-nightly.sh | sudo bash
sudo apt-get -f install locales build-essential automake subversion git pkg-config \
gawk libtool apertium-all-dev
(But you don't need to install from source if you just want to use the pair and not develop for it. There are nightly debian packages of the latest git commit; after running the first command you can get that package with sudo apt install apertium-eng-ita)

How to uninstall partially installed module with Pip

I recently decided to try to install tesseract onto my computer and ran pip3 install tesseract-ocr.
It then started to download cython which alerted me to the fact that tesseract-ocr was not what I wanted, so I hit CTRL-C to cancel the command.
However, it appears that there is still a Cython folder inside my directories; pip did not clean up after the cancel. Also, I can't use pip uninstall cython because it just tells me it hasn't been installed yet.
What can I do to get a clean removal of Cython?
FWIW, the package name you gave doesn't appear to be on the global pypi index, so perhaps you left some steps out?
pip3 install opencv-tesseract
Collecting opencv-tesseract
Could not find a version that satisfies the requirement opencv-tesseract
(from versions: )
No matching distribution found for opencv-tesseract
In this type of situation, I think the answer becomes:
In the future, let it finish installing, then uninstall it once complete, so that it can clean itself up properly.
Don't panic if pip is installing dependencies of the thing you're installing. When I pip3 install tesseract-ocr as in the edited question, I see:
Collecting tesseract-ocr
Downloading tesseract-ocr-0.0.1.tar.gz
Collecting cython (from tesseract-ocr)
...
Which is totally normal and just indicates you are installing a dependency of your dependency, in this case cython, so no need to cancel it.
Install dependencies to disposable virtualenvs so that you don't pollute your global packages and file system: https://virtualenv.pypa.io/en/stable/
You will probably just have to delete the leftover cython directories.
While you can delete the files manually (usually residing in the folder site-packages, it is better to completely reinstall the package, and then use pip uninstall <package> in order to completely uninstall it.
I also had this problem when I lost power to my Pi part way through installing linux-remote.
I deleted the .whl file to resolve the problem, which was located here in my case:
/root/.cache/pip/wheels/a0/75/....../linux-remote-3.4-cp37-none-any.whl

Offline Ansible Control Machine installation

I need to install Ansible Control Machine behind a corporate firewall with no internet access. I can't find documentation for an offline install. I have access on my workstation to download anything I want and can copy it to the target machine. I have tried searching online but have not been able to find examples on how to do this. My server is Ubuntu 14.04 but if anyone has documentation for Red Hat or another distro that would also help.
I did a testing on my RH6, so if you have a RH6 with Internet access to download all required installation file, and a RH6 installation ISO. You should be able to achieve this.
Assuming you have a RH6 which has Internet access, let's call it A. And another one doesn't have access: B.
download Ansible and Jinja2 from A, and copy the files to B.
For Ansible: http://docs.ansible.com/ansible/intro_installation.html
Jinja2 is required for Ansible, download it here:
https://pypi.python.org/pypi/Jinja2
Mount the RH6 installation ISO to your RH6 B, then install the required RPM.
In my case, i installed PIP as well:
rpm -ivh python-paramiko-1.7.5-2.1.el6.noarch.rpm libyaml-0.1.3-4.el6_6.x86_64.rpm PyYAML-3.10-3.1.el6.x86_64.rpm perl-TermReadKey-2.30-13.el6.x86_64.rpm perl-Error-0.17015-4.el6.noarch.rpm python-six-1.9.0-2.el6.noarch.rpm
//following required for Git
rpm -ivh --force --nodeps perl-Git-1.7.1-3.el6_4.1.noarch.rpm
rpm -ivh git-1.7.1-3.el6_4.1.x86_64.rpm
Note: i didn't install httplib2 here, you can do it later.
install MarkupSafe (required for Jinja2)
//install MarkupSafe
tar -xvf MarkupSafe-0.23.tar.gz
cd MarkupSafe-0.23/
sudo python setup.py install
install Jinja2
//install Jinjia2
tar -xvf Jinja2-2.8.tar.gz
cd Jinja2-2.8/
sudo python setup.py install
On RH6 B, you should be able to run Ansible now:
tar -zxvf ansible.tar.gz
source ./hacking/env-setup
echo "127.0.0.1" > ~/ansible_hosts
export ANSIBLE_INVENTORY=~/ansible_hosts
ansible --version
I know this is a very old question, but I've found the answer in this blog post and I believe that could help someone out there.
Although this post aproach is on a CentOS/RHEL machine, I believe the procedure is very similar to other distros:
Download the packages (RPM) dependencies
Download the Ansible packages
Upload the downloaded packages to the target machine
Install it using yum localinstall
Or you could also install it from the source.

Boost C++ Serialization lib missing in xubuntu installation

I have xubuntu OS installed on my PC (12.04, Precise Pangolin) and installed C++ boost lib (1.49) using ubuntu's binary repository for boost by issuing the following command in the terminal:
sudo apt-get install libboost-dev
The command completed successfully and now I need to use boost serialization lib which is named libboost_serialization for my application. However, I cannot find this in any location under /usr/ in my file system and I wonder why this lib has not been installed automatically when I issued the above apt-get command. Am I supposed install another package separately to get boost serialization library in place in my xubuntu installation? Thanks.
You probably want this package: http://packages.ubuntu.com/precise/libboost-serialization-dev.
If you want all Boost sub-packages installed in one operation, you also have a libboost-all-dev package.

Install gcc-c++ on CentOS without yum

Can I install gcc++ on CentOS 6.x without `yum install gcc-c++ ....' ?
Is there any .tar or .rpm package available for download?
Yum will install rpm from it's repository.
So I don't understand why you want to avoid yum, it will solve dependencies and install them as well.
However, here is official RPM repository mirror (one of many):
http://centos.arminco.com/5/os/i386/CentOS/
Here is list of all mirrors : http://www.centos.org/modules/tinycontent/index.php?id=30
You will need at least 3 RPMs:
gcc-4.4.6-3.el6.i686.rpm
gcc-c++-4.4.6-3.el6.i686.rpm
libgcc-4.4.6-3.el6.i686.rpm
For compilation of C/C++ you will also need libstdc++, glibc, etc
When you run
yum install gcc
Everything is done
As you did not specified architecture I assume i386, but URL is very similar for x86_64:
http://centos.arminco.com/6/os/x86_64/Packages/
If you want to install it as a local user (or as a superuser)
GNU GSRC provides an easy way to do so
Link: http://www.gnu.org/software/gsrc/
After installation via bzr, simply do these:
./bootstrap
./configure --prefix=~/local
make -C gnu/gcc
(or make -C gnu/gcc MAKE_ARGS_PARALLEL="-jN" to speed up for a N-core system)
make -C gnu/gcc install

Resources