I am familiar with creating my own hosted yum repository on a Linux host as well as mirroring public yum repositories. What I am looking for is a solution (paid or free) that will allow me to essentially proxy the Vendor Repo (so packages can remain current) but I would only like to allow specific packages and their dependencies. For example, the repo will allow httpd but also allow users to pull bash, mailcap, shadow-utils, httpd-tools, apr, apr-util, glibc, libdb, expat, lua, pcre, libselinux, systemd-libs, zlib, systems.
Any information would be very useful. I tried limiting via the "/etc/yum.conf" file however it still has the limitation that I know all of the dependencies.
You can exclude specific packages from yum install, example:
# yum install gcc
Dependencies resolved.
===============================================================================================================
Package Architecture Version Repository Size
===============================================================================================================
Installing:
gcc x86_64 8.4.1-1.el8 appstream 23 M
Installing dependencies:
glibc-devel x86_64 2.28-151.el8
if your /etc/yum.conf forbids installation:
[main]
...
exclude=glibc-devel <--- forbid installation
installation fails (proving that glibc-devel was not installed)
$ sudo yum install gcc | grep error
Problem: package gcc-8.4.1-1.el8.x86_64 requires glibc-devel >= 2.2.90-12, but none of the providers can be installed
Related
I'm trying to install Visual studio code.
My Raspb. Version is:
Distributor ID: Raspbian
Description: Raspbian GNU/Linux 9.8 (stretch)
Release: 9.8
Codename: stretch
I tried several method (starting to download .deb and using dpkg or install command) but nothing worked.
How can I fix this problem? I really need VSC because my project is growing and Geany messes up.
Downloaded .deb and .tar files from the official site, followed the setup instruction but I got this error
With dpkg (both 32 and 64bit):
"package architecture (amd64) does not match system (armhf)"
"package architecture (i386) does not match system (armhf)"
With sudo install:
sudo apt install ./code_1.33.1-1554971066_amd64.deb
Reading package lists... Done
Building dependency tree
Reading state information... Done
Note, selecting 'code:amd64' instead of './code_1.33.1-1554971066_amd64.deb'
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:
The following packages have unmet dependencies:
code:amd64 : Depends: libnotify4:amd64 but it is not installable
Depends: libnss3:amd64 (>= 2:3.26) but it is not installable
Depends: apt:amd64 but it is not installable
Depends: libxkbfile1:amd64 but it is not installable
Depends: libsecret-1-0:amd64 but it is not installable
Depends: libgtk-3-0:amd64 (>= 3.10.0) but it is not installable
Depends: libxss1:amd64 but it is not installable
E: Unable to correct problems, you have held broken packages.
With repository:
pi#raspberrypi:~/Downloads $ sudo apt-get update
Err:1 http://raspbian.raspberrypi.org/raspbian stretch InRelease
Temporary failure resolving 'raspbian.raspberrypi.org'
Err:2 http://archive.raspberrypi.org/debian stretch InRelease
Temporary failure resolving 'archive.raspberrypi.org'
Err:3 https://packages.microsoft.com/repos/vscode stable InRelease
Could not resolve host: packages.microsoft.com
Reading package lists... Done
W: Failed to fetch http://raspbian.raspberrypi.org/raspbian/dists/stretch/InRelease Temporary failure resolving 'raspbian.raspberrypi.org'
W: Failed to fetch http://archive.raspberrypi.org/debian/dists/stretch/InRelease Temporary failure resolving 'archive.raspberrypi.org'
W: Failed to fetch https://packages.microsoft.com/repos/vscode/dists/stable/InRelease Could not resolve host: packages.microsoft.com
W: Some index files failed to download. They have been ignored, or old ones used instead.
pi#raspberrypi:~/Downloads $ sudo apt-get install code
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Unable to locate package code
I'm getting mad about this problem, I tried older repository but they don't work.
There are Community builds of Visual Studio Code available (for Raspberry Pi and other ARM and Intel systems).
The packages are currently available in DEB and RPM format. You can use the scripts provided here to install the packages and add their repository to your system or install it manually.
Below I summarized the steps:
Open a new terminal. If you need super-user rights (you probably do), then you can enter sudo -s and press return to enter a super-user session. Run the installer for your current distribution:
APT instructions
(including Debian, Raspbian, Ubuntu and Linux Mint)
. <( wget -O - https://code.headmelted.com/installers/apt.sh )
Press the return key. Once the installer has completed, you should have a "Code - OSS" entry in your desktop program list.
Manual installation
If for any reason the script above will not work on your system, or you do not want to add the package source for updates, you can get the latest version of the package for your system below.
Public GPG key
For either APT or YUM installation, you'll want the public GPG key to verify the package, which you can download here.
APT and YUM packages
The latest packages are available directly from the PackageCloud releases page.
The specific package you need is available here.
EDIT:
At this time (29.04.2019) the current release (v. 1.32) appears not to be working for everybody. See: issue#64. Seems that you'll have to go back to v. 1.29, which is reported to be running fine.
You can choose this package and install it manually, or use APT. If you decide to install it via APT, note that you'll have to mark the package on hold as described below.
To prevent code-oss from upgrading (so that you can keep v. 1.29 until the issue is fixed) follow these instructions:
Install v. 1.29 via APT:
apt-get install code-oss=1.29.0-1539702286
Then mark it on hold by running:
apt-mark hold code-oss
Now running apt-get upgrade won't try to bump it up until you run:
apt-mark unhold code-oss
This will allow it to upgrade again as usual.
I'm trying to install RabbitMQ 3.7.4 on CentOS 6.8. Currently I have installed Erlang 20 following instruction from https://github.com/erlang/otp/blob/maint/HOWTO/INSTALL.md , but when I tried :
sudo yum install https://dl.bintray.com/rabbitmq/all/rabbitmq-server/3.7.4/rabbitmq-server-3.7.4-1.el6.noarch.rpm
it doesn't detect the Erlang 20. Instead it searched for the available Erlang package from my EPEL, which is the R14B, and wont install since it is lower than the minimum Erlang version requirements. How do I fix this and install RabbitMQ?
From the Installation instructions at https://packages.erlang-solutions.com/erlang/
Installation using repository
1. Adding repository entry
To add Erlang Solutions repository (including our public key for verifying signed package) to your system, call the following commands:
wget https://packages.erlang-solutions.com/erlang-solutions-1.0-1.noarch.rpm
rpm -Uvh erlang-solutions-1.0-1.noarch.rpm
Alternatively: adding the repository entry manually
RPM packages are signed. To add Erlang Solutions key, execute command:
rpm --import https://packages.erlang-solutions.com/rpm/erlang_solutions.asc
Add the following lines to some file in "/etc/yum.repos.d/":
[erlang-solutions]
name=CentOS $releasever - $basearch - Erlang Solutions
baseurl=https://packages.erlang-solutions.com/rpm/centos/$releasever/$basearch
gpgcheck=1
gpgkey=https://packages.erlang-solutions.com/rpm/erlang_solutions.asc
enabled=1
2. Adding repository with dependencies
Packages requires some packages that are not present in standard repository. Please ensure that EPEL respository is enabled.
3. Installing Erlang
Call the following command to install the "erlang" package:
sudo yum install erlang
or this command to install the "esl-erlang" package:
sudo yum install esl-erlang
Please refer to the FAQ for the difference between those versions. Your erlang will be kept up to date either way.
I tried to install this rpm software on my CentOS server:
[root#test software]# rpm -ivh nvidia-x11-drv-340xx-340.106-1.el7.elrepo.x86_64.rpm
error: Failed dependencies:
nvidia-340xx-kmod = 340.106 is needed by nvidia-x11-drv-340xx-340.106-1.el7.elrepo.x86_64
Here to say I need this nvidia-340xx-kmod package before installing nvidia-x11-drv-340xx-340.106-1.el7.elrepo.x86_64.rpm package.
I try to go to another machine that can connect to the internet to view the rpm package that this nvidia-340xx-kmod package needs, and then I will download it and install:
yum install kmod-nvidia-340xx
But the dependency of the kmod-nvidia-340xx package is the nvidia-x11-drv-340xx-340.106-1.el7.elrepo.x86_64.rpm package that I just wanted to install.
Dependencies Resolved
=================================================================================================
Package Arch Version Repository Size
=================================================================================================
Installing:
kmod-nvidia-340xx x86_64 340.106-1.el7_4.elrepo elrepo 4.9 M
Installing for dependencies:
nvidia-x11-drv-340xx x86_64 340.106-1.el7.elrepo elrepo 36 M
Transaction Summary
As you see, here is a yum endless loop.
It should be noted that this CentOS server cannot connect to the Internet for some safety reasons.
Then this server can't mount a local source image, because the server room is far from my office room and I don't want to go to that room to use an external storage device to create a local source image, then the server's free space is not enough to save a centos image, free space less than 1G(forgive me this strange problem).
So my question is, I tried to install this package, but the lack of installation process prompts the lack of this package as a dependency.
How can I fix this?
It looks like they depend on each other, so you need them both installed at the same time. sudo yum localinstall *.rpm from the directory they're copied to should work.
Help! I can't figure out how to install a jdk!
[/usr/lib/jvm]$ su -c "yum install java-1.7.0-openjdk-devel"
Loaded plugins: langpacks, presto, refresh-packagekit
No package java-1.7.0-openjdk-devel available.
Error: Nothing to do
[/usr/lib/jvm]$ su -c "yum install java-1.7.0-openjdk"
Loaded plugins: langpacks, presto, refresh-packagekit
No package java-1.7.0-openjdk available.
Error: Nothing to do
[/usr/lib/jvm]$ su -c "yum install java-1.6.0-openjdk-devel"
Loaded plugins: langpacks, presto, refresh-packagekit
No package java-1.6.0-openjdk-devel available.
Error: Nothing to do
[/usr/lib/jvm]$ su -c "yum install java-1.6.0-openjdk"
Loaded plugins: langpacks, presto, refresh-packagekit
No package java-1.6.0-openjdk available.
Error: Nothing to do
Here I've manually downloaded some rpm's, the last one from oracle's website:
[~]$ rpm -ivh java-1.7.0-openjdk-devel-1.7.0.19-2.3.9.3.fc20.x86_64.rpm
error: Failed dependencies:
java-1.7.0-openjdk = 1:1.7.0.19-2.3.9.3.fc20 is needed by java-1.7.0-openjdk-devel-1:1.7.0.19-2.3.9.3.fc20.x86_64
[~]$ sudo rpm -ivh java-1.7.0-openjdk-1.7.0.19-2.3.9.3.fc20.x86_64.rpm
Preparing... ################################# [100%]
file /usr/lib/jvm-exports/jre-1.7.0-openjdk.x86_64 from install of java-1.7.0-openjdk-1:1.7.0.19-2.3.9.3.fc20.x86_64 conflicts with file from package java-1.7.0-openjdk-1:1.7.0.9-2.3.7.0.fc18.x86_64
file /usr/lib/jvm/jre-1.7.0-openjdk.x86_64 from install of java-1.7.0-openjdk-1:1.7.0.19-2.3.9.3.fc20.x86_64 conflicts with file from package java-1.7.0-openjdk-1:1.7.0.9-2.3.7.0.fc18.x86_64
[~]$ sudo rpm -ivh jdk-7u21-linux-x64.rpm
Preparing... ################################# [100%]
file /etc/init.d/jexec from install of jdk-2000:1.7.0_21-fcs.x86_64 conflicts with file from package jdk-2000:1.6.0_38-fcs.x86_64
Debug
Here's some debug information:
[/usr/lib/jvm]$ yum search jdk
Loaded plugins: langpacks, presto, refresh-packagekit
=========================================================== N/S Matched: jdk ============================================================
java-1.7.0-openjdk-javadoc.noarch : OpenJDK API Documentation
jdk.x86_64 : Java(TM) Platform Standard Edition Development Kit
ldapjdk.noarch : The Mozilla LDAP Java SDK
Name and summary matches only, use "search all" for everything.
.
[/usr/lib/jvm]$ yum list java*
Loaded plugins: langpacks, presto, refresh-packagekit
Installed Packages
java-1.5.0-gcj.x86_64
.
[/usr/lib/jvm]$ cat /etc/fedora-release
Fedora release 18 (Spherical Cow)
Requirements
I must have "jni.h", "libjava.so", "libhpi.so", "lipverify.so" and "libjvm.so" included.
So far I've found out that these DO NOT have what I need:
Undesired Versions (for sure):
jdk1.7.0_06 <-- I'm surprised about this one, but it doesn't have libjvm nor libhpi
java-1.7.0
java-openjdk
java-1.7.0-openjdk-1.7.0.9.x86_64
java-1.5.0-gcj-4.4
java-1.6.0-openjdk
java-1.7.0-openjdk.x86_64
jre-1.5.0-gcj
jre-1.7.0-openjdk.x86_64
jre-openjdk
jre-1.7.0
jre-7u11-linux-x64.rpm java-1.5.0-gcj-1.5.0.0
jre-1.5.0
jre1.7.0_11
jre-gcj
And these do:
Desired Versions (that I know of, there could be more):
jdk1.6.0_34-x86
jdk1.5.0_22-x86
java-6-openjdk
Can someone help me install jdk1.6 or java-6-openjdk please?
The problem here is that you cannot use the Oracle rpm to install JDK 7 when you already have the Oracle JDK 6 as it tries to install the /etc/init.d/jexec script which is already installed and required for JDK 6.
I would advise sticking to the tarball or self extracting *.bin and using JAVA_HOME if you are going to use the Oracle distribution as it does not have this problem and you will probably not need jexec anyway.
In general I would suggest that you install the Oracle JDK not the OpenJDK. Otherwise you might risk running into some issues. I always found problems of all sorts and sizes with OpenJDK that I don't even bother trying it any more.
Download the JDK RPM from here and follow the usual instructions. Its usually very straightforward and without problems.
Full detailed instructions including how to install it here.
Make sure you choose the right version you need (JDK 1.7 or JDK 1.6, dont mix) because from your question you seem to have a confusion of library versions from 1.5 to 1.7.
And another thing, uninstall whatever you have installed already before installing a fresh one to avoid conflicts.
Check my answer here Transaction check error when installing Sun JDK 7
Basically you may use rpm --force to install one JDK on top of the other. This scenario is completely valid specially when you have to develop for different JAVA versions.
Just faced the same issue. I was not comfortable using --force command; did not want to risk messing-up the existing Java that came installed at system setup.
I ended up doing the following and running the app server with a different version of Java under a different user ID.
downloaded the Java tar.gz version and uncompressed:
tar -zxvf jdk-7u45-linux-x64.gz
Created the directory:
mkdir /usr/java/jdk1.7.0_45
Copied the contents to the new directory manually:
cp -r /.../jdk1.7.0_45/* /usr/java/jdk1.7.0_45
Set the java_home under the user ID home directory in .bashrc and .bash_profile files:
export JAVA_HOME=/usr/java/jdk1.7.0_45
export PATH=$JAVA_HOME/bin:$PATH
export PATH=$PATH:/usr/sfw/lib/gcc:/usr/sfw/bin
sudo rpm -i jdk-11.0.9_linux-x64_bin.rpm
or whatever package you are trying to install
I am working for some years with debian on engineering/administration level and using apt as packetmanager.
Now I have to work with a RHEL and I need some quick overview of how to handle packetmanagement there. I know the rpm-tool but not very well.
I am looking especially for this:
- how can I link my local PM to a paket-repository in the internet or on CD
- is rpm just for single files (like dpkg) or also for managin (like apt-get: searching etc)
so apt on debian is very cool. is there something comparable in RHEL too??
cheers, chris
is rpm just for single files (like dpkg) or also for managin (like apt-get: searching etc)
Not quite. Rpm is for Redhat what dpkg is for Debian. The Redhat equivalent of apt-tools/aptitute is yum.
I am looking especially for this: - how can I link my local PM to a paket-repository in the internet or on CD
Redhat puts repositories in files, rather then a single sources.list file. You find those repo-definitions in /etc/yum.repos.d/. So see what repositories are available, you use the command yum repolist. For instance, this Scientific Linux system of mine it gives the following output:
# yum repolist
repo id repo name status
epel Extra Packages for Enterprise Linux 6 - x86_64 6.416
sl Scientific Linux 6.1 - x86_64 6.251
sl-security Scientific Linux 6.1 - x86_64 - security updates 336
repolist: 13.003
If you want to add a repository, you either try getting a predefined file (hint: almost any 3rd party repository gives you an rpm which does everything automatically) or write your own repository defintion. Put it in a file called reponame.repo in /etc/yum.repos.d/. This is an example from the EPEL project:
[epel]
name=Extra Packages for Enterprise Linux 6 - $basearch
#baseurl=http://download.fedoraproject.org/pub/epel/6/$basearch
mirrorlist=https://mirrors.fedoraproject.org/metalink?repo=epel-6&arch=$basearch
failovermethod=priority
enabled=1
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-6
$basearch resolves to uname -m, so to x86_64 or i686. If you set everything up correctly (mandatory settings are name, baseurl and enabled=1), run yum update and check with yum repolist if your repository was correctly included.
Usually you'll only use yum; rpm alone is rarely used. If you're used to aptitude, yum won't be much of a challenge for you for the commands like update/upgrade/clean/erase are pretty much the same.
The yum documentation can be found on Fedora's webpage: http://docs.fedoraproject.org/en-US/Fedora/14/html/Software_Management_Guide/index.html
Good luck!
Alex.
Ubuntu "dkpg" -> RHEL -> "rpm"
Ubuntu "apt-get install **" RHEL -> "yum install **"
There are various unofficial available for RHEL and if you are subscribed to RHN then you get the packages directly from Red Hat Network.
Configuration files in /etc/yum.repos.d/