failed to fetch ...

Asked by Ray Mong

Hi, I want to install yadedaily on my Ubuntu 12.04.

sudo bash -c 'echo "deb http://www.yade-dem.org/packages/ xenial/" >> /etc/apt/sources.list'
wget -O - http://www.yade-dem.org/packages/yadedev_pub.gpg | sudo apt-key add -

are run in the terminal firstly.

And then the next step, I run "sudo apt-get update" in the terminal, it gets the following problem:

"W: Failed to fetch http://extras.ubuntu.com/ubuntu/dists/precise/Release.gpg Could not connect to extras.ubuntu.com:80 (91.189.92.152), connection timed out

W: Some index files failed to download. They have been ignored, or old ones used instead."

but I can open and download the file from "http://extras.ubuntu.com/ubuntu/dists/precise/Release.gpg" in my browser.

How can I fix it?
Any help will be appreciated.
Thank you.

Question information

Language:
English Edit question
Status:
Solved
For:
Ubuntu apt Edit question
Assignee:
No assignee Edit question
Solved by:
Manfred Hampl
Solved:
Last query:
Last reply:
Revision history for this message
Manfred Hampl (m-hampl) said :
#1

1. Support for Ubuntu 12.04 (precise) has ended a month ago (see https://wiki.ubuntu.com/Releases). You should consider a release upgrade in due course, because all repositories for precise will be removed soon.

2. If you repeat that command, do you consistently get the same error? Maybe it was just a temporary problem.

Revision history for this message
actionparsnip (andrew-woodhead666) said :
#2

What you are doing isn't dissimilar to searching for Windows updates and you are running Windows 2000.

They don't exist. Ubuntu releases don't last forever.

Revision history for this message
Ray Mong (huajun-ming) said :
#3

Hi, I have changed my computer system from Ubuntu 12.04 to Ubuntu 16.04.

And when I run these commands in the terminal:
sudo bash -c 'echo "deb http://www.yade-dem.org/packages/ xenial/" >> /etc/apt/sources.list'
wget -O - http://www.yade-dem.org/packages/yadedev_pub.gpg | sudo apt-key add -
sudo apt-get update
All of them is ok.

But when I input "sudo apt-get install yadedaily" in the terminal, it emerged some problems:
raymong@raymong-Lenovo:~$ sudo apt-get install yadedaily
Reading package lists... Done
Building dependency tree
Reading state information... Done
Package yadedaily is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source

E: Package 'yadedaily' has no installation candidate

Now what can I do for it? Thank you.

Revision history for this message
Manfred Hampl (m-hampl) said :
#4

For diagnostic purposes please provide the full output of the commands

tail /etc/apt/sources.list
sudo apt-get update
apt-cache policy yadedaily

Revision history for this message
Ray Mong (huajun-ming) said :
#5

Hi, Manfred
Thank you so much for the answering.

raymong@raymong-Lenovo:~$ tail /etc/apt/sources.list
# deb http://archive.canonical.com/ubuntu xenial partner
# deb-src http://archive.canonical.com/ubuntu xenial partner

deb http://security.ubuntu.com/ubuntu xenial-security main restricted
# deb-src http://security.ubuntu.com/ubuntu xenial-security main restricted
deb http://security.ubuntu.com/ubuntu xenial-security universe
# deb-src http://security.ubuntu.com/ubuntu xenial-security universe
deb http://security.ubuntu.com/ubuntu xenial-security multiverse
# deb-src http://security.ubuntu.com/ubuntu xenial-security multiverse
deb http://www.yade-dem.org/packages/ xenial/

raymong@raymong-Lenovo:~$ sudo apt-get update
[sudo] password for raymong:
Hit:1 http://cn.archive.ubuntu.com/ubuntu xenial InRelease
Hit:2 http://cn.archive.ubuntu.com/ubuntu xenial-updates InRelease
Hit:3 http://cn.archive.ubuntu.com/ubuntu xenial-backports InRelease
Hit:4 http://www.yade-dem.org/packages xenial/ InRelease
Get:5 http://security.ubuntu.com/ubuntu xenial-security InRelease [102 kB]
Fetched 102 kB in 8s (12.6 kB/s)
Reading package lists... Done

raymong@raymong-Lenovo:~$ apt-cache policy yadedaily
yadedaily:
  Installed: (none)
  Candidate: (none)
  Version table:

Revision history for this message
Manfred Hampl (m-hampl) said :
#6

Try

sudo rm -v /var/lib/apt/lists/*yade*
sudo apt-get update
apt-cache policy yadedaily

and report the results.

Revision history for this message
Manfred Hampl (m-hampl) said :
#7

And please provide also the output of

uname -a
dpkg --print-architecture
dpkg --print-foreign-architectures

Revision history for this message
Ray Mong (huajun-ming) said :
#8

raymong@raymong-Lenovo:~$ sudo rm -v /var/lib/apt/lists/*yade*
[sudo] password for raymong:
removed '/var/lib/apt/lists/www.yade-dem.org_packages_xenial_InRelease'
removed '/var/lib/apt/lists/www.yade-dem.org_packages_xenial_Packages'

raymong@raymong-Lenovo:~$ sudo apt-get update
Hit:1 http://cn.archive.ubuntu.com/ubuntu xenial InRelease
Hit:2 http://cn.archive.ubuntu.com/ubuntu xenial-updates InRelease
Hit:3 http://cn.archive.ubuntu.com/ubuntu xenial-backports InRelease
Get:4 http://www.yade-dem.org/packages xenial/ InRelease [2,460 B]
Get:5 http://security.ubuntu.com/ubuntu xenial-security InRelease [102 kB]
Get:6 http://www.yade-dem.org/packages xenial/ Packages [2,192 B]
Get:7 http://security.ubuntu.com/ubuntu xenial-security/main i386 DEP-11 Metadata [54.6 kB]
Get:8 http://security.ubuntu.com/ubuntu xenial-security/main DEP-11 64x64 Icons [41.9 kB]
Get:9 http://security.ubuntu.com/ubuntu xenial-security/universe i386 DEP-11 Metadata [35.7 kB]
Get:10 http://security.ubuntu.com/ubuntu xenial-security/universe DEP-11 64x64 Icons [52.2 kB]
Fetched 291 kB in 17s (16.4 kB/s)
Reading package lists... Done

raymong@raymong-Lenovo:~$ apt-cache policy yadedaily
yadedaily:
  Installed: (none)
  Candidate: (none)
  Version table:

raymong@raymong-Lenovo:~$ uname -a
Linux raymong-Lenovo 4.8.0-36-generic #36~16.04.1-Ubuntu SMP Sun Feb 5 09:39:41 UTC 2017 i686 i686 i686 GNU/Linux

raymong@raymong-Lenovo:~$ dpkg --print-architecture
i386
raymong@raymong-Lenovo:~$ dpkg --print-foreign-architectures
raymong@raymong-Lenovo:~$

Revision history for this message
Best Manfred Hampl (m-hampl) said :
#9

Look at http://www.yade-dem.org/packages/xenial/ and you will see that yadedaily is available only for 64bit architecture ("amd64") . Your system is 32bit ("i386" or "i686").

You have to install the 64bit variant of Ubuntu.

Revision history for this message
Ray Mong (huajun-ming) said :
#10

oh, my god. ok, i will install new version. thank you for your help.

Revision history for this message
actionparsnip (andrew-woodhead666) said :
#11

Why did you not install the 64bit version anyway, or is your system ancient?

Revision history for this message
Ray Mong (huajun-ming) said :
#12

Thank Manfred, that solved my problem.

actionparsnip, when I used windows, I used 32-bit processing, so I installed the 32-bit version ubuntu directly when I chose ubuntu as my new operating system.

Revision history for this message
Ray Mong (huajun-ming) said :
#13

Thanks Manfred Hampl, that solved my question.