LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Downloading Packages using yum* (https://www.linuxquestions.org/questions/linux-newbie-8/downloading-packages-using-yum%2A-4175612667/)

Joy Stick 08-26-2017 01:23 PM

Downloading Packages using yum*
 
Dear all,

I am getting bit confused.
I tried 2 ways to install oracleasm* package.

Option 1 --> was failed
Option 2 --> got succeeded.


Question 1 ) Why Option 1 was failed ?



>> Option 1 :
PHP Code:

# wget [url]http://yum.oracle.com/public-yum-el5.repo[/url]  
--2017-08-25 15:06:14--  [url]http://yum.oracle.com/public-yum-el5.repo[/url]  
Resolving yum.oracle.com... 49.44.120.7349.44.120.97  
Connecting to yum
.oracle.com|49.44.120.73|:80... connected.  
HTTP request sentawaiting response... 200 OK  
Length
4886 (4.8K) [text/plain]  
Saving to: `public-yum-el5.repo'  
  
  
100%[===============================================================================>] 4,886       --.-K/s   in 0.004s   
  
  
2017-08-25 15:06:15 (1.25 MB/s) - 
`public-yum-el5.repo' saved [4886/4886]  
 
>>
[root@DGPRIM yum.repos.d]# yum install oracleasm-`uname -r`  
Loaded plugins: security  
Setting up Install Process  
No package oracleasm-2.6.18-194.el5 available.  
Nothing to do 

>>
Quote:

# ls -l
total 8
-rw-r--r-- 1 root root 4886 May 5 01:04 public-yum-el5.repo
[root@DGPRIM yum.repos.d]# rm -rf *

>> Option 2
PHP Code:

# pwd
/etc/yum.repos.d
 
#vi oracleasm.repo  
[Oracleeasm]  
name=Oracle ASMLib Kernel Drivers for Red Hat Enterprise Linux Server 5  
baseurl
=http://yum.oracle.com/repo/OracleASM/RHEL5/$basearch/    
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-oracle   
gpgcheck=1   
enabled
=1   
 
>>
 
# yum install oracleasm-`uname -r` -y  
Loaded pluginssecurity  
Setting up Install Process  
Resolving Dependencies  
--> Running transaction check  
---> Package oracleasm-2.6.18-194.el5.i686 0:2.0.5-1.el5 set to be updated  
--> Processing Dependencyoracleasm-support >= 2.0.0 for packageoracleasm-2.6.18-194.el5  
--> Running transaction check  
---> Package oracleasm-support.i386 0:2.1.8-1.el5 set to be updated  
--> Finished Dependency Resolution  
  
  
Dependencies Resolved  
  
  
=========================================================================================================================  
Package                                 Arch                Version                     Repository                 Size  
=========================================================================================================================  
Installing:  
oracleasm-2.6.18-194.el5                i686                2.0.5-1.el5                 Oracleeasm                 22 k  
Installing 
for dependencies:  
oracleasm-support                       i386                2.1.8-1.el5                 Oracleeasm                 83 k  
  
  
Transaction Summary  
=========================================================================================================================  
Install       2 Package(s)  
Upgrade       0 Package(s)  
  
  
Total download size105 k  
Downloading Packages
:  
(
1/2): oracleasm-2.6.18-194.el5-2.0.5-1.el5.i686.rpm                                              |  22 kB     00:00      
(2/2): oracleasm-support-2.1.8-1.el5.i386.rpm                                                     |  83 kB     00:00      
-------------------------------------------------------------------------------------------------------------------------  
Total                                                                                    333 kB/105 kB     00:00      
Running rpm_check_debug  
Running Transaction Test  
Finished Transaction Test  
Transaction Test Succeeded  
Running Transaction  
  Installing     
oracleasm-support                                                                                 1/2  
  Installing     
oracleasm-2.6.18-194.el5                                                                          2/2  
  
  
Installed
:  
  
oracleasm-2.6.18-194.el5.i686 0:2.0.5-1.el5                                                                             
  
Dependency Installed
:  
  
oracleasm-support.i386 0:2.1.8-1.el5                                                                                    
  
Complete


Question 2)

Why we cannot query oracleasm related packages under /etc/yum.repos.d ?
Please see the path for following commands

PHP Code:

[root@DGPRIM yum.repos.d]# rpm -qa oracleasm*  
[root@DGPRIM yum.repos.d]# rpm -qa | grep oracleasm*  
 
>>
 
# cd  
# rpm -qa oracleasm*  
oracleasm-2.6.18-194.el5-2.0.5-1.el5  
oracleasm
-support-2.1.8-1.el5  
  
[root@DGPRIM ~]# rpm -qa | grep oracleasm*  
oracleasm-2.6.18-194.el5-2.0.5-1.el5  
oracleasm
-support-2.1.8-1.el5 

Thanks ...

KenJackson 08-26-2017 02:07 PM

I don't know for sure, but I noticed the baseurl for option 2, which worked, is this. But it's not in the .repo file you downloaded in option 1.
Code:

baseurl=http://yum.oracle.com/repo/OracleASM/RHEL5/$basearch/
For question 2, the problem might just be an issue of command-line expansion. In directory yum.repos.d the file "oracleasm.repo" matches "oracleasm*", so the asterisk (*) get's expanded and the rpm sees it as "oracleasm.repo". But there's no matching file in your root directory, so the asterisk gets passed to the rpm command--which is what you intended.

If that's what's happening, you can fix it by putting quotes around the wildcard.

rtmistler 08-26-2017 06:11 PM

Joy Stick you seem to always be starting threads about RHEL, Oracle, and Yum.

It is not helpful to create new threads and leave the other ones unresolved.

This is your warning to stop this behavior.

Joy Stick 08-27-2017 06:24 AM

Hi,


Quote:

This is your warning to stop this behavior.
It seems to ridiculous. Instead of helping me out of this problem , you are threatening me ..
I am NOT asking same questions over and over again.
Questions are regarding yum with various packages.

@ FYI: Still i did not get exact answer for my question.

jsbjsb001 08-27-2017 06:57 AM

Quote:

Originally Posted by Joy Stick (Post 5752456)
Hi,
It seems to ridiculous. Instead of helping me out of this problem , you are threatening me ..
I am NOT asking same questions over and over again.
Questions are regarding yum with various packages.

@ FYI: Still i did not get exact answer for my question.

If your using RHEL, why are you not seeking support from Red Hat?? If I were paying for support from them, I would be opening a support case with them.

You should also remember that members here, are NOT getting paid to help you.

I suggest you contact Red Hat for support.

KenJackson 08-27-2017 07:05 AM

Quote:

Originally Posted by Joy Stick (Post 5752456)
@ FYI: Still i did not get exact answer for my question.

I found this page that says to do what you did--create oracleasm.repo.

I'm sure you would rather use an official .repo file, but the fact that Oracle is giving those instructions instead of telling which .repo file to download suggests that they have not made the ASMLib packages available via any official .repo file.

That should answer question 1. If my answer for question 2 isn't correct, please tell me.

Joy Stick 08-27-2017 07:39 AM

Hi jsbjsb001

I am always using Oracle Linux 5.x and 6.x


@ jsbjsb001 wrote


Quote:

But there's no matching file in your root directory, so the asterisk gets passed to the rpm command--which is what you intended.
I am NOT clear on above statement. Please elaborate bot more.
Why it has to check root directory ?

Thanks js

KenJackson 08-27-2017 09:31 AM

Quote:

Originally Posted by Joy Stick (Post 5752469)
Why it has to check root directory ?

Oops. My mistake. I said "root directory" when I should have said "home directory".

When you issue the command rpm -qa oracleasm* the shell looks in the current directory to see if any file matches "oracleasm*". In first case, in /etc/yum.repos.d, it found one, so it replaced "oracleasm*" with "oracleasm.repo" and passed it to "rpm" when it executed it. That's not what you wanted.

But then you switched to your home directory, which apparently does NOT have any file that matches oraceleasm*, so it passed the parameter to rpm just as you typed it.

To get it to work in all cases, use quotes. In fact anytime you want to pass a wildcard character as a parameter, you should always wrap it in quotes.
Code:

rpm -qa 'oracleasm*'

TB0ne 08-30-2017 09:05 AM

Quote:

Originally Posted by Joy Stick (Post 5752456)
Hi,
It seems to ridiculous. Instead of helping me out of this problem , you are threatening me .. I am NOT asking same questions over and over again. Questions are regarding yum with various packages. @ FYI: Still i did not get exact answer for my question.

That is because you are either ignoring the answer, or don't understand it.

You were told explicitly that the version of OEL you're using is too old, and the repos aren't going to have what you're looking for, or are unavailable. Period. Your repo file explicitly states that you have an RHEL repo enabled...and RHEL is not supported any longer. Want to use RHEL repositories? Then PAY FOR RHEL as you've been told. Want to use OEL? Great...go get the latest version that will actually have what you're after.

Changing one package name and giving the same error over and over *IS* the same question...they're all related.

Joy Stick 08-30-2017 11:43 PM

Hi

Want to use OEL? Great...go get the latest version that will actually have what you're after.

Yes. I am moving to OEL 6.8 from OEL 5.5


All times are GMT -5. The time now is 11:58 AM.