Sign up ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free.

I have a fresh install of Ubuntu 12.04.3 LTS

Ruinning cat /etc/apt/sources.list


deb precise main restricted universe multiverse
deb precise-updates main restricted universe multiverse
deb precise-security main restricted universe multiverse

but if I run sudo apt-get update && sudo apt-get install mlocate locate
I get

Package locate is a virtual package provided by:
  locate:i386 4.4.2-4ubuntu1 [Not candidate version]

E: Package 'mlocate' has no installation candidate
E: Package 'locate' has no installation candidate

Please help! I never realised how much I depend on the find command..

Cheers, Paul

Update to answer @braiam

#apt-cache policy locate mlocate
  Installed: (none)
  Candidate: (none)
  Package pin: 4.4.2-4ubuntu1
  Version table:
     4.4.2-4ubuntu1 -10
        500 precise/universe amd64 Packages
  Installed: (none)
  Candidate: (none)
  Package pin: 0.23.1-1ubuntu2
  Version table:
     0.23.1-1ubuntu2 -10
        500 precise/main amd64 Packages

#uname -a
Linux xxxx 3.0.20-xenU #1 SMP Wed May 15 04:27:08 UTC 2013 x86_64 x86_64 x86_64 GNU/Linux

Second update to answer @braiam

:~# dpkg --print-foreign-architectures
:~# cat /var/lib/dpkg/arch

Third update to answer @braiam

sudo apt-get update
Get:1 precise-security Release.gpg [198 B]
Hit precise Release.gpg    
Get:2 precise-security Release [49.6 kB]
Get:3 precise-updates Release.gpg [198 B]
Hit precise Release                   
Get:4 precise-updates Release [49.6 kB]               
Get:5 precise-security/main amd64 Packages [342 kB]
Hit precise/main amd64 Packages          
Hit precise/restricted amd64 Packages
Hit precise/universe amd64 Packages          
Get:6 precise-security/restricted amd64 Packages [4,627 B]
Hit precise/multiverse amd64 Packages        
Get:7 precise-security/universe amd64 Packages [85.2 kB]
Hit precise/main i386 Packages               
Get:8 precise-security/multiverse amd64 Packages [2,439 B]
Hit precise/restricted i386 Packages         
Get:9 precise-security/main i386 Packages [360 kB]
Hit precise/universe i386 Packages
Hit precise/multiverse i386 Packages
Hit precise/main TranslationIndex
Hit precise/multiverse TranslationIndex
Hit precise/restricted TranslationIndex
Hit precise/universe TranslationIndex
Get:10 precise-updates/main amd64 Packages [708 kB]                                                                                                                                                 
Get:11 precise-security/restricted i386 Packages [4,620 B]                                                                                                                                         
Get:12 precise-security/universe i386 Packages [88.9 kB]                                                                                                                                           
Get:13 precise-security/multiverse i386 Packages [2,635 B]                                                                                                                                         
Hit precise-security/main TranslationIndex                                                                                                                                                         
Hit precise-security/multiverse TranslationIndex                                                                                                                                                   
Hit precise-security/restricted TranslationIndex                                                                                                                                                   
Hit precise-security/universe TranslationIndex                                                                                                                                                     
Get:14 precise-updates/restricted amd64 Packages [11.5 kB]                                                                                                                                          
Hit precise-security/main Translation-en                                                                                                                                                           
Get:15 precise-updates/universe amd64 Packages [222 kB]                                                                                                                                             
Hit precise-security/multiverse Translation-en                                                                                                                                                     
Hit precise-security/restricted Translation-en                                                                                                                                                     
Hit precise-security/universe Translation-en                                                                                                                                                       
Get:16 precise-updates/multiverse amd64 Packages [14.0 kB]                                                                                                                                          
Get:17 precise-updates/main i386 Packages [729 kB]                                                                                                                                                  
Get:18 precise-updates/restricted i386 Packages [11.4 kB]                                                                                                                                           
Get:19 precise-updates/universe i386 Packages [226 kB]                                                                                                                                              
Get:20 precise-updates/multiverse i386 Packages [14.2 kB]                                                                                                                                           
Hit precise-updates/main TranslationIndex                                                                                                                                                           
Hit precise-updates/multiverse TranslationIndex                                                                                                                                                     
Hit precise-updates/restricted TranslationIndex                                                                                                                                                     
Hit precise-updates/universe TranslationIndex                                                                                                                                                       
Hit precise/main Translation-en                                                                                                                                                                     
Hit precise/multiverse Translation-en                                                                                                                                                               
Hit precise/restricted Translation-en                                                                                                                                                               
Hit precise/universe Translation-en                                                                                                                                                                 
Hit precise-updates/main Translation-en                                                                                                                                                             
Hit precise-updates/multiverse Translation-en                                                                                                                                                       
Hit precise-updates/restricted Translation-en                                                                                                                                                       
Hit precise-updates/universe Translation-en                                                                                                                                                         
Fetched 2,925 kB in 19s (150 kB/s)                                                                                                                                                                                            
Reading package lists... Done
share|improve this question
Have you used sudo apt-get install mlocate:amd64? – Braiam Nov 24 '13 at 17:02

2 Answers 2

Create the /var/lib/dpkg/arch file with the following text:


Then do, sudo apt-get update and now you can start installing things again.

share|improve this answer
sorry no dice, after doing this I get same results. – P4ul Nov 21 '13 at 0:47
done, I removed the old output – P4ul Nov 21 '13 at 1:33
up vote 0 down vote accepted

After further investigation it turns out this has been disabled by the hosting company.

By default mlocate is not installed, and disabled if it is installed by default. The reason for this is due to the cron tasks and IO load it puts on the servers which can impact other servers on the same host. IO is the biggest cause for slow down on hosts which is why we are fairly strict. We prefer to encourage people to use the find command to find things eg find / -iname "somename"

When trying to figure this out the first place I turned to was google, I was unable to find anything useful on this problem.

I have added this as an answer so that hopefully people Googleing "unable to install locate" in the future can know to ask their hosting company first!

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.