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 ...


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!


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 ...


15

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


13

Alternative: zypper search -i -r <repo alias|#|URI>


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/...


10

RPM packages are precompiled and built for Red Hat Based Linux Distribution and can be installed only using yum, Zypper and RPM based package managers. Since Kali Linux is based on Debian you can not install RPM packages directly using apt or dpkg package managers. However, you can try a utility called Alien which can convert one package format into other ...


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


8

Please always use a file search : # dnf provides */libtinfo.so.5 .... and the reply is ncurses-compat-libs-6.0 Install : # dnf install ncurses-compat-libs


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-...


8

The dnf --downloadonly flag will pull down packages to the local cache without installing them. You can also use the dnf download command to download packages to the current directory (and you can do this as non-root). (This is a plugin; docs at man dnf.plugin.download.) With dnf download --resolve, you will also get any dependencies which are missing on ...


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.


6

Normally you install software or deb packages on Ubuntu/Mint linux via Synaptic, Ubuntu Software Center/ppa, or an apt-get command from the terminal. In another hand, Fedora, centos, mandriva, and redhat support rpm packages. Someday you have to install rpm package to your ubuntu/mint linux/debian box, there is a utility called Alien, Alien will converts ...


5

How to extract rpm packages contents export ins=foo-bar.rpm rpm2cpio $ins | cpio -idv How to extract tar.gz archive gzip -dc foo-bar.tar.gz | tar xvf – cd foo-bar-dir How to extract tar.gz packages to the current directory export file=foo-bar.tar.gz # Note that `xovf` switch order *matters* gzip -dc $file | tar -xovf - How to build binaries as a non-root ....


5

Either of the two previous answers are production ready as those methods will delete the user if the package is upgrade. Yum installs the new package then removes the old package. This will leave you without an user. Not cool! Use this method instead: %postun case "$1" in 0) # This is a yum remove. /usr/sbin/userdel myservice ;; 1) # This ...


5

The version of glibc you have installed does not satisfy the dependencies of the RPM you are trying to install. You mentioned that you are using RHEL 6.5 -- the RPM you are trying to install has "el7" in the filename (libtirpc-0.2.4-0.3.el7.x86_64.rpm) which means that it was compiled and built against RHEL 7. You can see that your system has GLIBC 2.12, ...


5

This happen when rpm package owns some directory or file while on the disk the file/directory is symlink. Or vice versa. This is known issue for long time. You either have to manually remove the symlink before installing/upgrading the package. Or alter the package to not own that file.


5

Yes, it is possible, relevant options for dnf are: --downloadonly Download resolved package set without performing any rpm transaction (install/upgrade/erase). --downloaddir=<path> Redirect downloaded packages to provided directory. The option has to by used together with --downloadonly command line option or with download command (dnf-plugins-core). ...


4

The response from Coderer is good but the second pre command give me an error on Centos 7. The group must be specified. Requires(pre): /usr/sbin/useradd, /usr/bin/getent Requires(postun): /usr/sbin/userdel %pre /usr/bin/getent group myservice > /dev/null || /usr/sbin/groupadd -r myservice /usr/bin/getent passwd myservice > /dev/null || /usr/sbin/...


4

If you need the list of packages needed, use: dnf repoquery --requires --resolve` In the case of firefox, by running: sudo dnf repoquery --requires --resolve firefox I've got the ouput: Last metadata expiration check: 0:00:00 ago on Wed 13 Dec 2017 21:41:47 GMT. atk-0:2.26.1-1.fc27.x86_64 bash-0:4.4.12-12.fc27.x86_64 cairo-0:1.15.8-1.fc27.x86_64 cairo-...


4

Linux Mint, being a Debian derivative, has a debdb instead of a rpmdb. Hence you must use dpkg/apt and not rpm/yum for the system to properly recognize the package.


4

It's a very bad idea, but it's possible. if ! exec </dev/tty; then : "deal with the case where you simply can't read from the user here" exit fi # ...the read command will work here.


4

Self answering this in-case anyone else gets confused by this. This error message turned out to be a little misleading. It was indeed a permissions issue (as expected) but not on any of the tmp dirs related to the rpm variables. Using strace with strace -p `ps --no-headers -fC rpmsign | awk '{print $2}'` -e trace=open,close Strace showed that after all ...


4

See: https://docs.fedoraproject.org/en-US/packaging-guidelines/Scriptlets/#_systemd In scriptlets you can use $1 variable for detecting if it is upgrade or clean install or upgrade or removal of package. The value of the variable is defined here: https://docs.fedoraproject.org/en-US/packaging-guidelines/Scriptlets/#_syntax


4

Just download a binary of ffmpeg. curl -O http://johnvansickle.com/ffmpeg/builds/ffmpeg-git-64bit-static.tar.xz tar xf ffmpeg-git-64bit-static.tar.xz Your new binary will be in the ffmpeg-git-64bit-static directory. If your kernel is older than 2.6.32+ then you won't be able to use this. If you're using a 32-bit system, then replace the 64bit with 32bit. ...


4

Use the verbose flag with yum repolist -v enabled $ yum repolist -v enabled Repo-id : epel Repo-name : Extra Packages for Enterprise Linux 6 - x86_64 Repo-revision: 1565313214 Repo-updated : Thu Aug 8 19:14:15 2019 Repo-pkgs : 12,559 Repo-size : 11 G Repo-metalink: https://mirrors.fedoraproject.org/metalink?repo=epel-6&arch=x86_64 ...


4

If main.tsflags in the yum configuration contains "nodocs" then the documentation won't have been installed in the first place.


3

Thread is a bit old but not answered... You can find what your java provides with rpm: [mdavis@x1pt01 yumrepo]$ rpm -q --provides java-1.5.0-gcj-1.5.0.0-29.fc12.x86_64 jaas = 1.5.0.0-29.fc12 java = 1.5.0 java-1.4.2-gcj-compat > 1.4.2.0-40jpp.111 java-1.5.0 = 1.5.0.0-29.fc12 java-gcj = 1.5.0.0-29.fc12 java-gcj-compat = 1.0.79 java-sasl = 1.5.0.0-29.fc12 ...


3

I verified today that on RHEL 6.7, the files are stored in /var/cache/yum/x86_64/6Server/rhel-6-server-rpms/packages/. It is also worth noting that the plugin downloadonly is included in RHEL 6: # yum install yum-downloadonly Package yum-plugin-downloadonly-1.1.30-30.el6.noarch is obsoleted by yum-3.2.29-69.el6.noarch which is already installed


3

For a single package rpm -qpl package.rpm works. If you want to select multiple packages and get file lists for all of them at once (with an indication of what package they are from) then --filesbypkg is more useful.


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