Fedora Linux Support Community & Resources Center

Go Back   FedoraForum.org > Fedora 19/20 > Using Fedora
FedoraForum Search

Forgot Password? Join Us!

Using Fedora General support for current versions. Ask questions about Fedora that do not belong in any other forum.

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 9th March 2011, 12:56 AM
feimingchen Offline
Registered User
 
Join Date: Mar 2011
Posts: 11
linuxfedorafirefox
"yum" cannot access mirror sites but "Add/Remove Software" can.

Hi: I'd like to ask a question on installing software.

I cannot install software using "yum" but I can with the GUI program "Add/Remove Software". For example, I tried:

$ su -c 'yum install screen.i686'

It will exhaust all the mirror sites without success. All the error messages look like:


Package(s) data still to download: 16 k
http://mirrors.usu.edu/fedora/linux/...14.noarch.rpm: [Errno 12] Timeout on http://mirrors.usu.edu/fedora/linux/...14.noarch.rpm: (28, '')
Trying other mirror.
http://mirror.pnl.gov/fedora/linux/r...14.noarch.rpm: [Errno 14] PYCURL ERROR 7 - ""
Trying other mirror.
http://linux.mirrors.es.net/fedora/r...14.noarch.rpm: [Errno 14] PYCURL ERROR 7 - ""
Trying other mirror.


But I can install "screen.i686" easily from the "Add/Remove Software" GUI and it is very fast.

However, what's puzzling is that I could install some certain packages although I still see the same kind of error messages. For example,

su -c 'yum install nano.i686'

will work. But in general, "yum" is running very slow and is rejected at every mirror sites.

My settings: I just installed "Fedora 14" (Linux 2.6.35.11-83.fc14.i686) as a virtual machine (using VirtualBox) on a Windows XP (Professional, SP3) host on my laptop (CPU: Intel Core2 Duo), which accesses internet through a HTTP Proxy server since it is behind a corporate firewall.

Could anyone help? Thanks a lot!

Sincerely,
Feiming Chen
Reply With Quote
  #2  
Old 9th March 2011, 04:50 PM
feimingchen Offline
Registered User
 
Join Date: Mar 2011
Posts: 11
linuxfedorafirefox
Re: "yum" cannot access mirror sites but "Add/Remove Software" can.

After reading some posts, I tried:

$ yum clean all
$ yum update

in root account. And I can do the "yum install" in Root Account. But I still could not do it in a user's account: "su -c 'yum install *" still generates all the mirror sites errors.

Last edited by feimingchen; 9th March 2011 at 05:31 PM.
Reply With Quote
  #3  
Old 9th March 2011, 05:55 PM
DBelton Offline
Administrator
 
Join Date: Aug 2009
Posts: 7,334
linuxfedorafirefox
Re: "yum" cannot access mirror sites but "Add/Remove Software" can.

you need to set up your proxy server in either yum or your shell.

one way is to set up the proxy server by creating 2 files in /etc/profile.d like so (advantage to doing it this was is that your proxy is set up for any applications running in a shell, not just yum):
Code:
#proxy.sh
export http_proxy=http://host.com:port/
export ftp_proxy=http://host.com:port/
export no_proxy=.domain.com
export HTTP_PROXY=http://host.com:port/
export FTP_PROXY=http://host.com:port/

#proxy.csh
setenv http_proxy http://host.com:port/
setenv ftp_proxy http://host.com:port/
setenv no_proxy .domain.com
setenv HTTP_PROXY http://host.com:port/
setenv FTP_PROXY http://host.com:port/
You can also set up a proxy in the [main] section of /etc/yum.conf
Code:
proxy=http://<server>:<port>
also, there is a reason you can't do a "yum install" in a user account. It requires root privileges

to run yum from a user account, you must su (or sudo) to root.
Code:
su -
(root password)
yum install

Last edited by DBelton; 9th March 2011 at 05:59 PM.
Reply With Quote
  #4  
Old 9th March 2011, 06:17 PM
giulix Offline
"Fixed" by (vague) request
 
Join Date: Oct 2005
Location: GMT+ 1
Posts: 2,950
linuxfedorafirefox
Re: "yum" cannot access mirror sites but "Add/Remove Software" can.

If you use Gnome to setup your proxy server (System->Preferences->Network Proxy) the environment variables will be set up for you. You can check them out with
Code:
env |grep -i proxy
from a terminal
Reply With Quote
  #5  
Old 10th March 2011, 04:41 PM
feimingchen Offline
Registered User
 
Join Date: Mar 2011
Posts: 11
linuxfedorafirefox
Smile Re: "yum" cannot access mirror sites but "Add/Remove Software" can.

Hi: Thank you very much for your valuable suggestions!

giulix: I did set up the proxy server through the GUI interface. Using your code, I get:

Code:
$ env | grep -i proxy
NO_PROXY=localhost,127.0.0.0/8
http_proxy=http://bddsproxy.bdx.com:80/
FTP_PROXY=http://bddsproxy.bdx.com:80/
ftp_proxy=http://bddsproxy.bdx.com:80/
all_proxy=socks://bddsproxy.bdx.com:80/
ALL_PROXY=socks://bddsproxy.bdx.com:80/
https_proxy=http://bddsproxy.bdx.com:80/
HTTPS_PROXY=http://bddsproxy.bdx.com:80/
no_proxy=localhost,127.0.0.0/8
HTTP_PROXY=http://bddsproxy.bdx.com:80/
DBelton: I implemented all of your code suggestions. And they solved the problem! Now I could use:
Code:
sudo yum install ...
sudo yum info ...
# etc
in my user's account without getting any errors (rejection from mirror sites). Thanks a lot!

Thanks a lot for your support! I am just starting to use Fedora Linux and find the experience pleasant and exhilarating.
Reply With Quote
  #6  
Old 11th March 2011, 05:18 AM
DBelton Offline
Administrator
 
Join Date: Aug 2009
Posts: 7,334
linuxfedorafirefox
Re: "yum" cannot access mirror sites but "Add/Remove Software" can.

I believe that setting up the proxy in Gnome, only set them up for the current user, and yum runs as root. At least that's how it has worked in the past.

Glad you have it working now and are able to get your updates with yum
Reply With Quote
  #7  
Old 11th March 2011, 08:52 AM
giulix Offline
"Fixed" by (vague) request
 
Join Date: Oct 2005
Location: GMT+ 1
Posts: 2,950
linuxfedorafirefox
Re: "yum" cannot access mirror sites but "Add/Remove Software" can.

I think that running gpk-application from your "normal" user means it inherits that user's environment. That is different from running
Code:
su -
from a terminal, as
"`-'
`-l'
`--login'
Make the shell a login shell. This means the following. Unset all
environment variables except `TERM', `HOME', and `SHELL' (which
are set as described above), and `USER' and `LOGNAME' (which are
set, even for the super-user, as described above), and set `PATH'
to a compiled-in default value. Change to USER's home directory.
Prepend `-' to the shell's name, intended to make it read its
login startup file(s). Additionaly `DISPLAY' and `XAUTHORITY'
environment variables are preserved as well for PAM functionality.

(info coreutils 'su invocation'). In fact, running simply
Code:
su
(i.e. no dash) preserves the user environment, including the "proxy" environment variables
Reply With Quote
  #8  
Old 16th March 2011, 10:21 PM
feimingchen Offline
Registered User
 
Join Date: Mar 2011
Posts: 11
linuxfedorafirefox
Thumbs up Re: "yum" cannot access mirror sites but "Add/Remove Software" can.

Thanks again for all of your information and solutions!
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
"ls" and "cd" treat ".." differently inside symlinked directories bnorman Using Fedora 0 19th June 2008 05:49 PM
HOW TO MOUNT "C" "D" "E" LOCAL HARDDISK PARTITION ketan_hk Using Fedora 6 6th September 2007 02:10 AM
Metacity and "Xlib: extension "SHAPE" missing on display ":0.0". debu_sagii Using Fedora 0 29th August 2007 06:53 PM
Help, How to - Remove "Places" and "Desktop" Menus bwinfrey Using Fedora 7 5th May 2006 12:19 PM
Error:visibility arg must be one of "default", "hidden", "protected" or "internal" wangfeng Using Fedora 0 23rd May 2005 05:59 AM


Current GMT-time: 05:20 (Monday, 24-11-2014)

TopSubscribe to XML RSS for all Threads in all ForumsFedoraForumDotOrg Archive
logo

All trademarks, and forum posts in this site are property of their respective owner(s).
FedoraForum.org is privately owned and is not directly sponsored by the Fedora Project or Red Hat, Inc.

Privacy Policy | Term of Use | Posting Guidelines | Archive | Contact Us | Founding Members

Powered by vBulletin Copyright 2000 - 2012, vBulletin Solutions, Inc.

FedoraForum is Powered by RedHat
Zhezqazghan Photos - Khanpur - Trinidad and Tobago