Unable to install dowloaded rpm package - installation

I downloaded the rpm file from https://centos7.iuscommunity.org/ius-release.rpm to local.I want to install that dowloaded file in centos environment.
However when i give "yum -y install ius-release-1.0-15.ius.centos7.noarch.rpm" in my dockerfile,I am getting an error "error: open of ius-release-1.0-15.ius.centos7.noarch.rpm failed: No such file or directory".
Aim is to install the local rpm package which is resting in the directory where dockerfile is present.
Please help me !
Is it that i am not giving the right path of that rpm file?

The command needed would be yum -y localinstall <filename> but you will need to modify your Dockerfile to ADD the file to the docker image first.

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)

rename command not found when running Ubuntu 20.04 on VirtualBox

I installed Ubuntu 20.04 on my VirtualBox on my Windows 10 PC.
One of the tasks I wanted to do, was rename a bunch of files with the .txt extension to a .html extension. After searching online, I found that using the rename command would work.
But when attempting to run rename, I get the following error:
Command 'rename' not found. Did you mean:
Command 'hrename' from deb hsfutils (3.2.6-14)
Try: sudo apt install < deb name>
Upon trying
sudo apt install rename
I get the following error:
Unable to locate package rename
I also tried
sudo apt update
But it did not work.
Could someone tell me what to do?
Open your terminal and paste the following command
sudo apt-get install rename
Same issue.
E: Unable to locate package rename
I ended up just downloaded the .deb file.
https://ubuntu.pkgs.org/22.04/ubuntu-universe-amd64/rename_1.30-1_all.deb.html
Make sure you have perl installed.
sudo apt install perl-base --upgrade
Just for the record, rename on Linux is NOT the same as rename on windows. Rename is a powerful tool for doing batch file renames with complex patterns in one line that would otherwise take multiple lines with bash, find, mv, and other commands.

Centos: yum install ffmpeg fails?

I'm trying to install ffmpeg on my server.
The problem is that when i run the following command:
yum install ffmpeg
I get the following error:
http://apt.sw.be/redhat/el6/en/x86_64/dag/repodata/repomd.xml: [Errno 14] PYCURL ERROR 6 - "Couldn't resolve host 'apt.sw.be'"
Trying other mirror.
Error: Cannot retrieve repository metadata (repomd.xml) for repository: dag. Please verify its path and try again
I have this is in etc/yum.repos.d/CentOS-Base.repo
[dag]
name=Dag RPM Repository for Centos
baseurl=http://apt.sw.be/redhat/el$releasever/en/$basearch/dag
enabled=1
I know the issue is the http://apt.sw.be as they are down...
I cannot find an alternative mirrors for it... could someone please let me know if there are any working mirrors for this?
Dag/rpmforge is dead. Just download a static binary of ffmpeg or compile ffmpeg instead of using an old, outdated repository.
Extract it from the archive file and move it to /usr/local/bin if you want it available to all users, or just ~/bin if you don't have superuser/root.

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.

pointing to a different yum repository

I am not sure if this is possible or if there's any easier way but I am trying to install a software package but its not available when I search for it within Yum. I read their documentation and they seem to have a fedora package which I think amazon's ec2 linux image is based on(or cent os).
If I just change my repository to point to fedora or download the rpm, would that work? Or would that break something?
what is this application?
what you can do:
you have rpm file
$ wget [link to rpm file]
$ su -c 'yum --nogpgcheck localinstall [path to my rpm]
rpm is in testing
$ su -c 'yum install --enablerepo=updates-testing [application name]
You have source application
$ read README file and follow indication

Resources