Hot answers tagged

43

Here is how to get devtoolset-2 (including gcc 4.8.1) This was taken from http://people.centos.org/tru/devtools-2/readme wget http://people.centos.org/tru/devtools-2/devtools-2.repo -O /etc/yum.repos.d/devtools-2.repo yum install devtoolset-2-gcc devtoolset-2-binutils devtoolset-2-gcc-c++ Known issues: unsigned packages CentOS-6 devtoolset-2 needs ...


35

For one repo you can add the following in the repo configuration: sslverify=0 For all repos, you can add the following to "/etc/yum.conf": sslverify=false


29

There is new version of devtoolset 2.0. Nice people from Cern working on Scientific Linux created an open version: If you use CentOS (not Scientific Linux), then you will have to import their GPG key from here using: rpm --import http://www.scientificlinux.org/documentation/gpg/RPM-GPG-KEY-cern Enjoy!


23

I put the following locale relating setting in /etc/bashrc (for all users, bash): export LANG=en_US.UTF-8 export LANGUAGE=en_US.UTF-8 export LC_COLLATE=C export LC_CTYPE=en_US.UTF-8 then run: source /etc/bashrc or log off and log on.


21

# 1. Install a package with repository for your system: # RHEL 6: `yum-config-manager --enable rhel-server-rhscl-6-rpmss` # RHEL 7: `yum-config-manager --enable rhel-server-rhscl-7-rpms` $ sudo yum install centos-release-scl # On CentOS 6/7+, install package centos-release-scl available in CentOS repository # 2. Install the collection: $ sudo yum install ...


19

You can create swap file: fallocate -l 512M /swapfile chmod 600 /swapfile mkswap /swapfile swapon /swapfile This will create swap file and you will be able to install applications. To remove swap file: swapoff -a rm -f /swapfile see Arch wiki for details.


18

With Yum, you would use the package-cleanup command from yum-utils. But, with DNF, it's built in as the dnf autoremove command. From the docs: dnf [options] autoremove Removes all “leaf” packages from the system that were originally installed as dependencies of user-installed packages but which are no longer required by any such package. Note that ...


15

If you have a local RPM, you can get a list of dependencies via: rpm -qpR mediawiki-1.4rc1-4.i586.rpm


13

I just did the same install on CentOS 6. Since the install instructions are more geared toward Ubuntu, here is what I was able to do to install it: install all the required packages using yum yum groupinstall "Development Tools" yum install gcc yum install cmake yum install git yum install gtk2-devel yum install pkgconfig yum install numpy yum ...


13

This issue is the server seem to only have 490MB of RAM on the machine and you have 421MB used. Leaving only 68MB free; that is not a lot of memory for any system to work with. Looking at the output from top shows that MySQL (aka: mysqld) is the culprit. The best thing you can do if this is a temporary situation is to simply stop MySQL like this: sudo ...


12

I found out why the docs are not installed: it is not a feature of Docker but of the CentOS Docker image. Yum and rpm configs both contain options that prevent the installation. They may be disabled by adding the following lines to the Dockerfile: RUN sed -i '/excludedocs/d' /etc/rpm/macros.imgcreate RUN sed -i '/nodocs/d' /etc/yum.conf


12

dnf is a background service that updates the repository metadata automatically. dnf makecache is scheduled to run after every reboot To disable dnf-makecache.service: systemctl disable dnf-makecache.service Also disable the dnf-makecache.timer or the service will be restarted: systemctl disable dnf-makecache.timer Regards


11

You also can install the download only plugin for yum which causes the rpms to be downloaded to the cache directory but not installed. yum install yum-plugin-downloadonly Then use it with the --downloadonly flag. yum install --downloadonly -y wireshark Then you will find the rpms in the cache directory as set by your /etc/yum.conf e.g cachedir=/var/tmp/...


11

Just run dnf clean expire-cache first to make sure it validates the cache before using it or, even better, just add --refresh to your command because, as the manual page says: --refresh set metadata as expired before running the command


10

I was successful with on CentOS 6.4 yum install gcc-c++.x86_64


10

Finally found the answer: show all versions of a lib: yum list available gcc --showduplicates show specified repo only yum --disablerepo="*" --enablerepo="google" list available gcc --showduplicates


10

After more sleuthing, I figured it out. There was a directory hierarchy missing, and yum couldn't detect my CentOS version. Running the following commands fixed it right up: mkdir -p /etc/yum/vars echo 7.2.1511 > /etc/yum/vars/releasever Replace "7.2.1511" with your own release version if you are having this problem and nothing else has worked. UPDATE ...


9

To update PHP 5.3.3 to 5.4.4: wget http://download.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm rpm -ivh epel-release-6-8.noarch.rpm wget http://rpms.famillecollet.com/enterprise/remi-release-6.rpm rpm -Uvh remi-release-6*.rpm yum --enablerepo=remi upgrade php-mysql php-devel php-gd php-pecl-memcache php-pspell php-snmp php-xmlrpc php-xml


9

Can someone please give me an overview in simple language of what are the contents inside yum.repos.d and how does it differ from the contents inside /etc/yum.conf [?] Per this RedHat Article on YUM: The configuration file for yum and related utilities is located at /etc/yum.conf. This file contains one mandatory [main] section, which allows you to set ...


8

Root Cause Interruption in the up2date or yum update process caused the installation of multiple versions of the same package. Resolution If the system is Red Hat Enterprise Linux 5 or later, the package-cleanup command can be used: $ package-cleanup --dupes $ package-cleanup --cleandupes The --dupes command will list the duplicate packages installed on ...


8

How can I remove this latest kernel from my system? I was apparently specifying the version incorrectly. This works: $ sudo yum remove kernel-3.10.0-229.1.2.el7 How can I prevent it from being installed in the next yum update? To do so manually, use the --exclude option, like so: $ sudo yum update --exclude=kernel


8

Oracle has special mechanism to download files from them. I wrote just wget and download link. It did not download the full file. Solution is to click through their site with accepting licence or to write wget like this: wget --no-cookies --no-check-certificate --header "Cookie: gpw_e24=http%3A%2F%2Fwww.oracle.com%2F; oraclelicense=accept-securebackup-...


7

The tutorial has you download PHP from a third party repository named webtatic. The operator of this repro has compiled the source tarballs of various versions of PHP that are not in the official CentOS repository. Presumably the 'w' stands for 'webtatic', to differentiate these packages from the official CentOS ones.


7

The reason why it fails is because yum needs to know what the repo URL is. In your configuration file, you have this: #baseurl=http://mirror.centos.org/centos/$releasever/os/$basearch/ The # sign means it is commented, thus, yum will ignore that line and won't know which the URL is. Simply remove the hash sign and then use yum normally. Note: You should ...


7

simplescreenrecorder is not available in the standard CentOS repos. You can get it from li.nux.ro. # yum install epel-release # rpm -Uvh http://li.nux.ro/download/nux/dextop/el7/x86_64/nux-dextop-release-0-5.el7.nux.noarch.rpm then # yum install simplescreenrecorder Good luck!


7

Try sudo amazon-linux-extras Amazon has a dedicated channel https://aws.amazon.com/amazon-linux-2/faqs/#Amazon_Linux_Extras


6

I would like to add: yum -v repolist all in case the server is using Spacewalk or part of RedHat this can be very useful to find the Repository URL. NOTE: If the server is registered to Spacewalk there will be no entries under /etc/yum.repos.d/ At least using the command to register like : rhnreg_ks --activationkey=<key> --serverUrl=http://<...


6

In centos, Mostly this problem is happened due to the cause of 2 versions of python are being installed in the same machine .. Centos is using python 2.6 by default with yum while there is another version of python that is installed and used in the current system by default .. that is why it is giving the following message It's possible that the above ...


6

On CentOS 7.5, running this worked: yum-config-manager --save --setopt=<REPONAME>.sslverify=false


Only top voted, non community-wiki answers of a minimum length are eligible