I have been struggling to get yum to work when trying to install emacs in my recent installation of Fedora 20, and posted the question, on this site. "How can I get yum and the internet browser to work after fresh Fedora 20 installation", which inspired several useful answers (many thanks to the kind posters), but none of them, unfortunately, solved it. I don't expect any more to come from that question, but I have tried an approach that might work, but it still fails with the error in this question.
I came across the suggestion
[root@localhost Harry]# setenforce 0 [root@localhost Harry]# yum clean expire-cache [root@localhost Harry]# yum update selinux-policy\* [root@localhost Harry]# setenforce 1
And tried it out, not getting very far:
[root@localhost Harry]# setenforce 0 [root@localhost Harry]# yum clean expire-cache Loaded plugins: langpacks, refresh-packagekit Cleaning repos: fedora updates 0 metadata files removed [root@localhost Harry]# yum update selinux-policy\* Loaded plugins: langpacks, refresh-packagekit fedora/20/i386/metalink | 33 kB 00:00 http://ftp.up.pt/fedora/releases/20/Everything/i386/os/repodata/repomd.xml: [Errno 14] curl#6 - "Could not resolve host: ftp.up.pt" Trying other mirror.
and so it went on for ages, the same error,
[Errno 14] curl#6 - "Could not resolve host: www.mirrorservice.org" I get whenever I try to use yum.
I followed the lead I had and tried this, which looked promising, but again it failed with an error that I cannot fathom out:
[root@localhost Harry]# yum-config-manager --add-repo=http://download.fedoraproject.org/pub/fedora/linux/updates/testing/20/i386/ Loaded plugins: langpacks, refresh-packagekit adding repo from: http://download.fedoraproject.org/pub/fedora/linux/updates/testing/20/i386/ [download.fedoraproject.org_pub_fedora_linux_updates_testing_20_i386_] name=added from: http://download.fedoraproject.org/pub/fedora/linux/updates/testing/20/i386/ baseurl=http://download.fedoraproject.org/pub/fedora/linux/updates/testing/20/i386/ enabled=1 [root@localhost Harry]# yum install emacs Loaded plugins: langpacks, refresh-packagekit You have enabled checking of packages via GPG keys. This is a good thing. However, you do not have any GPG public keys installed. You need to download the keys for packages you wish to install and install them. You can do that by running the command: rpm --import public.gpg.key Alternatively you can specify the url to the key you would like to use for a repository in the 'gpgkey' option in a repository section and yum will install it for you. For more information contact your distribution or package provider. Problem repository: download.fedoraproject.org_pub_fedora_linux_updates_testing_20_i386_
But again a failure, I get it whenever I try
[root@localhost Harry]# rpm --import public.gpg.key error: public.gpg.key: import read failed(2).
So my question is: is this is a useful approach, and, if so, how do I get round the
import failed(2) error?
In answer to Leiaz's comment, thank you, this is what I get from ifconfig. It's a wired connection to a BT Homehub 3 router, May I add that I have no problem with the internet in Windows XP installed on the same dual boot machine, nor on the two laptops with a wireless connection to the same router. I also have no trouble with the Firefox browser in this Linux, which is the one with the yum trouble, and the one I am using to post this question: in fact it is faster than the one on my laptop.
[root@localhost Harry]# ifconfig lo: flags=73<UP,LOOPBACK,RUNNING> mtu 65536 inet 127.0.0.1 netmask 255.0.0.0 inet6 ::1 prefixlen 128 scopeid 0x10<host> loop txqueuelen 0 (Local Loopback) RX packets 8 bytes 668 (668.0 B) RX errors 0 dropped 0 overruns 0 frame 0 TX packets 8 bytes 668 (668.0 B) TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0 p20p1: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500 inet 192.168.1.100 netmask 255.255.255.0 broadcast 0.0.0.0 inet6 fe80::76d4:35ff:fe5c:f999 prefixlen 64 scopeid 0x20<link> ether 74:d4:35:5c:f9:99 txqueuelen 1000 (Ethernet) RX packets 62356 bytes 42267371 (40.3 MiB) RX errors 0 dropped 0 overruns 0 frame 0 TX packets 56754 bytes 11151168 (10.6 MiB) TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
Thanks vonbrand and again Leiaz. This is what I get:
[root@localhost Harry]# cat /etc/resolv.conf # Generated by NetworkManager domain home search home nameserver 192.168.1.254 [root@localhost Harry]# route -n Kernel IP routing table Destination Gateway Genmask Flags Metric Ref Use Iface 0.0.0.0 192.168.1.254 0.0.0.0 UG 1024 0 0 p20p1 192.168.1.0 0.0.0.0 255.255.255.0 U 0 0 0 p20p1 [root@localhost Harry]# [root@localhost Harry]# ping 192.168.1.254 PING 192.168.1.254 (192.168.1.254) 56(84) bytes of data. 64 bytes from 192.168.1.254: icmp_seq=1 ttl=64 time=0.701 ms 64 bytes from 192.168.1.254: icmp_seq=2 ttl=64 time=0.678 ms 64 bytes ... ... time=0.683 ms 64 bytes from 192.168.1.254: icmp_seq=10 ttl=64 time=0.668 ms 64 bytes from 192.168.1.254: icmp_seq=11 ttl=64 time=0.665 ms ^Z + Stopped ping 192.168.1.254 [root@localhost Harry
Having no idea how to deal with ipv6, and unable to find the answer on the Internet, I thought I would try a different Linux, so I have installed openSUSE, but it appears to have the same problem. As with Fedora, I am using Firefox from within Linux, to post this, and the 'net is fully working in the other windows partition.
Please, please can someone help me to solve this, I am completely stumped. Without
emacs and a C compiler, well Linux is no longer any use to me, after happily using it for more than ten years.
Here is the relevant openSUSE result:
harry@linux-18x3:~> gcc If 'gcc' is not a typo you can use command-not-found to lookup the package that contains it, like this: cnf gcc harry@linux-18x3:~> cnf gcc The program 'gcc' can be found in following packages: * gcc [ path: /usr/bin/gcc, repository: zypp (openSUSE-13.1-1.10) ] * gcc [ path: /usr/bin/gcc, repository: zypp (repo-oss) ] Try installing with: sudo zypper install gcc harry@linux-18x3:~> sudo zypper install gcc root's password: Download (curl) error for 'http://download.opensuse.org/distribution/13.1/repo/non-oss/content': Error code: Connection failed Error message: Could not resolve host: download.opensuse.org Abort, retry, ignore? [a/r/i/? shows all options] (a):