Pages

Saturday, April 13, 2013

[Errno 14]Centos-Could not open/read file:///media/CentOS/repodata/repomd.xml,file:///media/cdrecorder/repodata/repomd.xml,file:///media/cdrom/repodata/repomd.xml

CentOS-Repository Error

 file:///media/CentOS/repodata/repomd.xml: [Errno 14] Could not open/read file:///media/CentOS/repodata/repomd.xml
Trying other mirror.
file:///media/cdrecorder/repodata/repomd.xml: [Errno 14] Could not open/read file:///media/cdrecorder/repodata/repomd.xml
Trying other mirror.
file:///media/cdrom/repodata/repomd.xml: [Errno 14] Could not open/read file:///media/cdrom/repodata/repomd.xml
Trying other mirror.
Error: Cannot retrieve repository metadata (repomd.xml) for repository: c6-media. Please verify its path and try again
[root@dhcppc4 Desktop]# yum install yumex yum-fastestmirror yum-skip-broken yum-kmod yum-kernel-module yum-priorities
Loaded plugins: fastestmirror, refresh-packagekit
Loading mirror speeds from cached hostfile
 * base: centos.aol.in
 * c6-media:
 * epel: mirror.unej.ac.id
 * extras: centos.aol.in
 * updates: centos.aol.in
base                                                     | 3.7 kB     00:00    
file:///media/CentOS/repodata/repomd.xml: [Errno 14] Could not open/read file:///media/CentOS/repodata/repomd.xml
Trying other mirror.
file:///media/cdrecorder/repodata/repomd.xml: [Errno 14] Could not open/read file:///media/cdrecorder/repodata/repomd.xml
Trying other mirror.
file:///media/cdrom/repodata/repomd.xml: [Errno 14] Could not open/read file:///media/cdrom/repodata/repomd.xml
Trying other mirror.
Error: Cannot retrieve repository metadata (repomd.xml) for repository: c6-media. Please verify its path and try again

Walkthrough :

To counter this error we need to make some changes as a root in Centos.
I read somewhere that centos keeps up with same set of repos that it came with for a span of 10 years.So it looks for softwares only in specified repositories.

To counter this situation We need to change some repo files of Centos.Make sure you are logged in as root and take backup of each file alongside.

Open the following file
/etc/yum.repos.d/CentOS-Base.repo

 In this you will find sections from where centos reads repositories such as

#additional packages that extend functionality of existing packages

and

#contrib - packages by Centos Users

under these sections you will find that are

enabled=1

change this to

enabled=0

similerly Open the following file
/etc/yum.repos.d/CentOS-Media.repo

for [c6 media] section set
enabled=0

You might also need to modify

/etc/yum.repos.d/epel.repo similer fashion if you are getting erros from same file.

That's it you will be able to download from any repository now

linux user not in sudoers error,giving root permissions to a user

To give root permissions to a user the way out is

We need to edit a file called  

/etc/sudoers 

Note: (I am using CentOS) while writing this one down so customize acordingly

This file orignally has readonly permission for root which must be changed from its properties=>permissions which must be changed to read and write permissions

Now open this file using your favorite editor I am using G Edit

And look for a command like

# User privilege specification
root    ALL=(ALL) ALL
 
This specifies
 
The root user can execute from ALL terminals, acting as ALL (any) users, and run ALL (any) command. 
 
Add your 
username ALL=(ALL) ALL

for example for me it was 

gaurav ALL=(ALL) ALL

that's it

Wednesday, April 3, 2013

Ubuntu Unity Indicators Missing-Power,Time,Shutdown

If you are in a mess with unity and some of your indicators have vanished here is a some commands to bring them back

For Shutdown and user profile use following command

sudo apt-get install indicator-session

for  Time use

sudo apt-get install indicator-datetime

For Battery and Power use 

sudo apt-get install indicator-power

Ubuntu-Unity Issues-Font Issues-Dash Home not Finding Applications

Recently I went through this error during Ubuntu update to version 12

A text of white on white was appearin also Dash Home was not finding applications.The result was due to corrupted Unity User Interface.

To correct the same I ran following 2 commands from Terminal

rm ~/.cache/software-center -R
 
which sorted out my issue of ubuntu sodtware center not running
 
and then
 
unity --reset &
 
which told me to do a complete reinstall of unity via following command
 
sudo apt-get install unity