Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I don't know much about Linux, but i must install MySql on it. This is my command
Quote:
[root@localhost hieund]# rpm -ivh mysql-server-5.0.48-1.el4.centos.i386.rpm
warning: mysql-server-5.0.48-1.el4.centos.i386.rpm: V3 DSA signature: NOKEY, key ID 443e1821
error: Failed dependencies:
mysql = 5.0.48-1.el4.centos is needed by mysql-server-5.0.48-1.el4.centos.i386
And
Quote:
[root@localhost hieund]# yum install mysql-server-5.0.48-1.el4.centos.i386.rpm
Setting up Install Process
Setting up repositories
Cannot find a valid baseurl for repo: update
Error: Cannot find a valid baseurl for repo: update
Anyone please tell me the way to get out of this trouble, please ????
You first tried to use rpn ( which is OK because you have the packages ) but then tried to install using yum - which wont work are none of your repo's are set up.
Well yum is better solution as it will eliminate all the dependency issues. Using --nodeps option is just a workaround which should not be used unless absolutely necessary. OP has got working internet connection and should use yum to install packages rather.
I would also use "yum install mysql-server". It solves the dependencies automatically, and this should work without downloading any rpm files. The option --nodeps should be used really carefully.
Part of the problem MAY be that Centos only supports the most current dot release, of the 4.X release I think that is 4.7. Jumping from 4.5 to 4.7 is just a matter of yum update. Problems can arise when the .repo files have been hard coded.
Maybe another idea: Any reason why you are still using RHEL 4.x (CentOS 4.x)? RHEAL 5.3 is out and RHEL 5.4 is on the way.. so maybe you should update if possible.
While I would agree that using yum is the way to go, I do not think that Centos4.X is a bad choice. Centos4.x will be supported until Feb 2012. With RHEL/Centos 6 having been pushed back over a year(thus far) it is likely that the support life for 4.X and 5.X will be extended beyond the normal period(beyond 2012 for C4). If you do have to do a clean install and do not have a specific reason to stick with 4.X, then I would agree switching to 5.X would be a good idea.
I still suspect that the issues you are seeing with yum are that you have not update your machine to 4.7. Centos ONLY supports the most current dot release. Until you update the rest of the system to the 4.7 level you may not be able to install the mysql version you want. If you look here:
You will see that both of these are empty. If you have your repos hard coded to 4.5 they will not be able to work(there is nothing there for it to work with).
Hi,
As lazlow said, i can understand that i cannot use yum to install mysql in CentOS 4.5, right?
But my friend, he'd chosen some package when he installed CentOS 4.5. And he uses yum successfully.
But I installed CentOS normally, i still cannot use yum.
Ah, I installed CentOS using VMWare, and it can connect to internet.
[base]
name=CentOS-$releasever - Base
mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=os
#baseurl=http://mirror.centos.org/centos/$releasever/os/$basearch/
gpgcheck=1
gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-centos4
priority=1
protect=1
#released updates
[update]
name=CentOS-$releasever - Updates
mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=updates
#baseurl=http://mirror.centos.org/centos/$releasever/updates/$basearch/
gpgcheck=1
gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-centos4
priority=1
protect=1
#packages used/produced in the build but not released
[addons]
name=CentOS-$releasever - Addons
mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=addons
#baseurl=http://mirror.centos.org/centos/$releasever/addons/$basearch/
gpgcheck=1
gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-centos4
priority=1
protect=1
#additional packages that may be useful
[extras]
name=CentOS-$releasever - Extras
mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=extras
#baseurl=http://mirror.centos.org/centos/$releasever/extras/$basearch/
gpgcheck=1
gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-centos4
priority=1
protect=1
#additional packages that extend functionality of existing packages
[centosplus]
name=CentOS-$releasever - Plus
mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=centosplus
#baseurl=http://mirror.centos.org/centos/$releasever/centosplus/$basearch/
gpgcheck=1
enabled=0
gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-centos4
priority=2
protect=1
#contrib - packages by Centos Users
[contrib]
name=CentOS-$releasever - Contrib
mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=contrib
#baseurl=http://mirror.centos.org/centos/$releasever/contrib/$basearch/
gpgcheck=1
enabled=0
gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-centos4
priority=2
protect=1
2.yum.conf
Code:
[main]
cachedir=/var/cache/yum
debuglevel=2
logfile=/var/log/yum.log
pkgpolicy=newest
installonlypkgs=kernel kernel-smp kernel-devel kernel-smp-devel kernel-largesmp kernel-largesmp-devel kernel-hugemem kernel-hugemem-devel
distroverpkg=centos-release
tolerant=1
exactarch=1
retries=20
obsoletes=1
gpgcheck=1
plugins=1
# PUT YOUR REPOS HERE OR IN separate files named file.repo
# in /etc/yum.repos.d
options:
-h, --help show this help message and exit
-t, --tolerant be tolerant of errors
-C run entirely from cache, don't update cache
-c [config file] config file location
-R [minutes] maximum command wait time
-d [debug level] debugging output level
-e [error level] error output level
-y answer yes for all questions
--version show Yum version and exit
--installroot=[path] set install root
--enablerepo=[repo] enable one or more repositories (wildcards allowed)
--disablerepo=[repo] disable one or more repositories (wildcards allowed)
--exclude=[package] exclude package(s) by name or glob
--obsoletes enable obsoletes processing during updates
--noplugins disable Yum plugins
[root@localhost ~]#
[CODE]
I am running C5 so it is just a difference between the two versions of yum (nothing to worry about). As you can see from my output it just tells you which repos are known(to yum) and which ones are active. However as you posted your repo file we can see that you have the centosplus repo shut off(which has the series5 mysql). However I think that is only half of the problem. In order for this to work we have to get the base yum repo up and running on your system.
Now, if you do a " cat /etc/redhat-release " I suspect it will spit out 4.5. When the above line inserts the releasever(4.5) into the address there is nothing there. What you may have to do is comment out(add a # in front of)the above line and TEMPORARILY hard code in the proper address(just until you can get through a basic yum update). Something like:
I am probably a little off (but it should be within +- one directory) but you can see the basic idea. Once you have the system up to the 4.7 level things should get easier.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.