install apt-get on linux Red Hat server - linux

I'm setting up a Linux Red Hat web server. apt-get isn't installed, but yum is. However, yum cannot find the apt package.
When I run apt-get, I get a message from the shell saying that the command apt-get couldn't be found. When I try yum install apt or yum install apt-get I get a message saying yum couldn't find the package and there was nothing to do
I suspect that it's probably a case of editing a sources list (as with apt) to add the source that apt is available from, but I a) don't know where this source list would be, and b) don't know what source would provide apt...
If anyone could enlighten me, it would be greatly appreciated

If you have a Red Hat server use yum. apt-get is only for Debian, Ubuntu and some other related linux.
Why would you want to use apt-get anyway? (It seems like you know what yum is.)

If you insist on using yum, try yum install apt.
As read on this site:
Link

I think you're running into problems because RedHat uses RPM for managing packages. Debian based systems use DEBs, which are managed with tools like apt.

wget http://dag.wieers.com/packages/apt/apt-0.5.15lorg3.1-4.el4.rf.i386.rpm
rpm -ivh apt-0.5.15lorg3.1-4.el4.rf.i386.rpm
wget http://dag.wieers.com/packages/rpmforge-release/rpmforge-release-0.3.4-1.el4.rf.i386.rpm
rpm -Uvh rpmforge-release-0.3.4-1.el4.rf.i386.rpm
maybe some URL is broken,please research it.
Enjoy~~

Related

Linux: How to install certain old version of a software via apt-get

I am trying to install the same versions of Apache, MySQL and PHP in my Linux PC (Raspberry Debian) as installed in my remote public server.
For instance, I'd like to install the last legacy release of the 2.2 branch, Apache/2.2.31.
apt-cache showpkg apache2
Output:
Package: apache2
Versions:
2.4.10-10+deb8u4 (/var/lib/apt/lists/mirrordirector.raspbian.org_raspbian_dists_jessie_main_binary-armhf_Packages)
But there isn't any information about the 2.2.31 version, neither in "Reverse Provides" section. I can do it by compiling from the sources, but it takes a lot of time. And I tried to find a reliable PPA or a reliable sources for deb packages, without any success.
How can I do it?
If APT tracks the specific version you are looking for, (like Kyle said) then it's pretty easy.
sudo apt-get install <pkg_name>=<pkg_version>
or
sudo apt-get -t=<target_version> <pkg_name>
To see which packages are tracked, run
apt-cache showpkg <package_name>
Unfortunately though, if a particular version is not managed by the APT, then you are out of luck using APT. It might be managed by some of the other package managers out there.
Ref. How can I downgrade a package via apt-get?
If you have the version number, or the target release, apt-get supports choosing a particular version or target release. More details can be found on manual page of apt-get. It can also be accessed from a terminal by typing man apt-get.
sudo apt-get install <package-name>=<package-version-number>
or
sudo apt-get -t=<target release> install <package-name>

difference between wget and apt get

Im trying to install google's tensor flow API and i'm following their instructions on this link to no avail.
after typing the following command:
sudo apt-get install python-pip python-dev
i get:
sudo: apt-get: command not found
I'm new to Linux and i was told there are tow types, red-hat and a nameless parallel, which answers respectively to either wget or apt-get. I was also told i need to adjust the commands. (wget does works)
is this true? What is the accurate difference between wget and apt-get? how do i adjust the commands to my situation?
i'm working with:
SUSE Linux Enterprise server 11 (x86_64)
release 11
Suse Linux has not installed apt-get by default. you should go with zypper:
zypper install python-devel python-pip
apt-get is a packagemanagment system while wget is only good for filetransfer
apt-get is a package manager for Debian distros while SUSE Linux is equipped with zypper.
You can use:
zypper install python-devel python-pip
You can also compile python without using package manager like zypper. Wget is used to download things and is not a package manager. Thus when you will compile, you'll need the package. So you'll use wget.

xz compression install on centos

Any installation or update using yum command I ended up error: Error: xz compression not available. On website I read that Python library is missing. When you try to install a library (sudo yum update pyliblzma) again failed with error. Do not know how? Thanks.
This problem comes if you installed a wrong epel release on your machine. If so, then you need to remove the epel release by
yum remove epel-release
Sometimes that is not enough, you need to remove the cache as well by:
rm -rf /var/cache/yum/x86_64/6/epel
Then you can install the epel-release again
yum -y install epel-release
You need install the EPEL repository by downloading the appropriate RPM package for your system and installing it. For example, for CentOS and Red Hat Enterprise Linux 6.x:
wget http://dl.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm
sudo rpm -Uvh epel-release-6*.rpm
If you get a File Not Found error message when trying to download the package, the version number might have changed. You can access the latest version of the RPM installer from the Fedora EPEL wiki page. The wiki page also includes additional instructions for Red Hat Network subscribers who are installing the EPEL repository.
Finally, install the Python library:
yum install pyliblzma
This works perfecly in my CentOS 6.x.
I've found a solution on this page of stackexchange, working in CentOS 6.X:
https://unix.stackexchange.com/a/314756
sudo rpm -e epel-release-7-5.noarch
wget http://download.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm
sudo rpm -ivh epel-release-6-8.noarch.rpm
sudo yum clean all
sudo rpmdb -v --rebuilddb
sudo yum -y install libselinux-python
I was also suffering from this issue..
If you are installing packages but it is already available on your system.
Remove existing packages and then try to install new.
It will work properly...
I was able to solve this problem by installing pyliblzma using rpm instead of yum as yum is not working.
Find pyliblzma rpm package according to your architecture and install it using the command.
rpm -Uvh pyliblzma-version-release.architecture.rpm
I used the following command to install pyliblzma for my 64 bit Redhat 6.8 machine. Please check URL in the command and make changes accordingly.
rpm -Uvh http://dl.fedoraproject.org/pub/epel/6/x86_64/pyliblzma-0.5.3-3.el6.x86_64.rpm
In my case the issue was caused by missing modules in python's site-packages directory. Here's what I did:
$ rpm -Va
to get a list of all files belonging to all rpms that do not verify. I got a bunch of messages about missing modules:
missing /usr/lib64/python2.7/site-packages/...
Luckily, I had an identical CentOS version elsewhere with all these packages present, so I just copied them over and ran
$ rpmdb -v --rebuilddb
to rebuild rpm database.

Can't install python-dev on centos 6.5

Can't install python-dev on centos 6.5. Yum says "No package python-dev available.". No graphical solutions please.
On CentOS, the python development libraries are under the name python-devel, not python-dev.
So you should use
sudo yum install python-devel
to install them on your CentOS system.
You can search the repositories available to you using the yum search xxxxx command, where xxxxx is the name or part of the name of the package you are looking for.
Further, you may need to specify the architecture (such as python-devel.x86_64), although in my experience yum will automatically install the package that is appropriate for your system. Again, yum search will show you what is available in the repositories you currently have installed/enabled.
Did you try
yum groupinstall -y 'development tools'
Did you try to download the RPM package and install it?
Did you try to install python-pip then issue pip install python-dev?
For anyone looking to install python-devel now, you can use yum install platform-python-devel.x86_64

Downloading 'Yum groupinstall "development tools"'?

I've looked all over and build essentials are all I see that was replaced by Development tools. When I type the command I receive "no such command".
What is the alternative to this?
apt-get build-dep package-i-want-to-build to get everything you need to build package - often the easiest way to get the dev tools is to pick a sufficiently complicated package like pidgin and run this
or
apt-get install build-essential to just get a compiler
Ubuntu doesn't use yum. You still want to use the apt instructions.
Debian, Ubuntu, Mint, etc. have APT package manager, not YUM. In these OSes you generally need to do following to install basic development tools, like C and C++ compilers, binutils, etc:
sudo apt install build-essential

Resources