-
Notifications
You must be signed in to change notification settings - Fork 832
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
apt-get update fails in Ubuntu 16.04 #640
Comments
I don't believe Ubuntu 16.04 is supported by WSL right now. |
It's still working fine here. ubuntu@DESKTOP-3RQO5S5:/mnt/c/Users/Dave/Desktop$ sudo apt-get update
sudo: unable to resolve host DESKTOP-3RQO5S5
Hit:1 mirror://mirrors.ubuntu.com/mirrors.txt xenial InRelease
Hit:2 mirror://mirrors.ubuntu.com/mirrors.txt xenial-updates InRelease
Hit:3 mirror://mirrors.ubuntu.com/mirrors.txt xenial-backports InRelease
Hit:4 mirror://mirrors.ubuntu.com/mirrors.txt xenial-security InRelease
Reading package lists... Done
ubuntu@DESKTOP-3RQO5S5:/mnt/c/Users/Dave/Desktop$ sudo apt-get upgrade
sudo: unable to resolve host DESKTOP-3RQO5S5
Reading package lists... Done
Building dependency tree
Reading state information... Done
Calculating upgrade... Done
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded. |
@Manouchehri do you get Ubuntu 16.04 when you run lsb_release -a? |
@Manouchehri Unrelated, but if do "sudo rm /etc/hosts" and restart bash.exe does the sudo: unable to resolve host DESKTOP-3RQO5S5 error message go away? |
Alex: Yes, I'm definitely running 16.04.
Ben: I'll try that when I get home and let you know.
|
@benhillis: Yep, that fixed it as expected. Thanks. |
ubuntu@DESKTOP-3RQO5S5:~$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 16.04 LTS
Release: 16.04
Codename: xenial
ubuntu@DESKTOP-3RQO5S5:~$ uname -a
Linux DESKTOP-3RQO5S5 3.4.0+ #1 PREEMPT Thu Aug 1 17:06:05 CST 2013 x86_64 x86_64 x86_64 GNU/Linux |
I'm having the same issue, this is what my konsole displays:
Could someone offer any solution? |
I did an "strace appstreamcli refresh-index" and saw a permission denied during rename of /var/cache/app-info/xapian/default. |
@AskeFC hi, thanks that worked. |
For others who may come across this thread, you may get "You might need superuser permissions to perform this action." to which you can put " |
@AskeFC 777 permissions are a really bad idea. If you need to run several commands as root, just run |
@Manouchehri
|
I think it is better just to add DESKTOP-3RQO5S5 to the line that states: |
... appears to be the safer fix for this issue, since in WSL you are already root... |
@adamkruszewski |
@KubuntuUser and @Manouchehri hi, that fix is a temporarily one since a day or two after doing that the problem comes back. |
Just wanted to ping this one because it definitely seems to be a "WSL thing". The |
Hey everyone, I had the same issue of the apt-get update failing. So I googled a bit. This was the second page that came up. The first one was http://askubuntu.com/questions/761592/unable-to-apt-get-dist-upgrade-on-a-persistent-ubuntu-16-04-usb |
Might want to give this a try.
be sure to check out the changes it will make before you commit. but was only way forward was to take a step back for me. |
Just ran into this error today:
Following the step mentioned by @ezzep ( |
Looks like I have to change that permission more than once. Maybe it's reset somehow. |
sudo mv /var/cache/app-info/xapian/default /var/cache/app-info/xapian/default_old Simple and secure! Background: I did sudo apt-get update again and got: ** (appstreamcli:32262): CRITICAL **: Error while moving old database out of the way. Running sudo strace appstreamcli refresh-index gave me: rename("/var/cache/app-info/xapian/default", "/var/cache/app-info/xapian/default_old") = -1 EXDEV (Invalid corss-device link) I fixed that by renaming the file and refreshing the index |
@AskeFC Works perfectly. Thank you! |
@tgvcdr this solution did not work for me. I had to apply the permissions fix by @jonstanley instead, which worked. |
And failed again after a reboot. |
Does anyone on the MSFT team understand the root cause of this problem? I get a 100% hit rate on this issue since WSL was released, across multiple clean installs of both Trusty and Xenial. Which is weird -- I would have expected that if everyone is hitting this issue to see more dupes and more "is this fixed yet?" posts here. Maybe it is because the I'll take a run at tracking and doing a min repro, but last time (~ a year ago) when I looked at it the problem wasn't straightforward. It seems to be a "sticky" issue caused by the first update (or upgrade) run that manifests in the next. So the |
yeah .. I guess you could write a script something like
save it as apt-update |
I'll throw my hat into the ring. Using VcXsrv and have installed Ubuntu-Desktop followed by Xubuntu-Desktop in order to run xfce4. Not sure which witch is which casting this spell:
Hopefully someone can summarize all the above messages into a single plan for WSL newbies like me. |
So, at extreme risk of jinxing the hell out of myself, I haven't been getting " If others are having the same experience ("it works now"), maybe we can close this out or dupe it into one of the "NTFS supporting posix-style rename" issues. Might just be a false positive on my end for reasons. |
@therealkenc As awesome as that would be...I believe I may have this issue myself. However, I am currently in the process of apt-get upgrade, so this status may change. Will edit this post accordingly upon completion. It works now. Using your suggestion to chmod 755 and then doing dist-upgrade worked out perfectly. Thank you! |
hi and it goes on.... |
A few options: (1) Go back to the supported release (Ubuntu Xenial from the Store) This issue is for tracking |
I've been continuing to get it on Xenial installed from the store on apt 1.2.26 (amd64). chmod does solve it temporarily. I'm hoping it'll go away with this impending feature update. |
I have since deleted Ubuntu from my system, removed the linux stuff you had to add in programs and features.. rebooted .. installed linux stuff again and went to the Windows Store and downloaded Ubuntu there .. With the version from the store (which seems to be the exact same thing but located in a different place on the drive) I don't seem to have this issue anymore |
Unfortunately if you are still seeing it, not so much. #1529 is alive and well. Still wonder why I am not seeing it recently, since I haven't changed my process. But the problem is going to be entirely dependent on your package set; which differs for everyone. |
https://administratosphere.wordpress.com/2016/12/25/appstream-error-in-ubuntu-16-04-xenial/ Verified this as a fix, (at least in win 10 WSL) |
Ubuntu 16.04 is now supported in the Microsoft Store. For additional issues with app packages please file a separate issue. Thanks |
That Ubuntu 16.04 is available in the Store is unrelated to the perennially unaddressed issue of:
Which is almost certainly dupe #1529 as suggested by Ben's post, but we don't have enough specificity to actually mark it as such. |
actually it sort of is an answer ... if you bother to look up to my comment made April 13... if you delete Ubuntu completely from your system and remove the windows subsystem for Linux, reboot .. then install the Linux subsystem again reboot once more and go to the store to install Ubuntu ... it works without this issue. If you want it fixed .. then just delete it and install it from the Windows store as suggested and its fixed .. most likely the reason you are still seeing it is because the original was actually 14.04 ... the 14.04 was probably updated to 16.04 but was not designed to or some leftover stuff from 14.04 is causing issues with 16.04 ... deleting the old "broken" version and reinstalling it with the now "official" version from the Windows store will solve this issue in this thread |
And if you look one above that comment you'll see my assertion that I installed 16.04 from the store (around Christmas 2017 on a brand new Surface Book 2) rather than upgrading. Now if there's been some fix since then that involves doing a reinstall that's something else. I don't have this problem on 18.04 installed from the store, but that doesn't indicate the underlying issue may not still exist on new installs of 16.04 or 18.04 since the underlying issue may not be 100% reliable repro. I'm now on the April(?) 2018 update of Win 10/ 10.0.17134. |
well if you were seeing it with the store version and never installed the original borked version ... then it has to be something with your install or hardware ... or maybe I have been lucky with my two versions of hardware since I reinstalled it and since I upgraded my PC .. once I got rid of the original version that wasn't from the store and reinstalled linux subsystem and then installed the 16.04 from the store ... I have never had the issue again since. |
appstreamcli —version If you don't see this, its borked, If they fixed the package with the "new" version fine, but simply updating Appstream fixes the issue. My comment prior to tara-raj has the whole process on the third party blog. |
Agreed. Alright we'll call this tag external. It isn't, really, because Real Linux does not manifest the error reported by paladox in 2016, and nothing has changed in WSL since then with respect to the error. If someone has a link to the PR that addressed the problem with AppStream that would be instructive. The error cited in the blog is:
If the PR fixes our |
The above discussion was helpful for me. I upgraded appstreamcli and I think that the permissions issue has gone away (at version 0.10.6). I am also having a problem where do-release-upgrade (trying to go from 16.04 to 18.04) is failing wihtout an error. I hoped that this fix would help, but it has not. See #3489 for a discussion. |
What are the correct safe permissions for (Or, in other words, if we blindly ran
Changing it to Obviously if changing it to |
Has anyone succeeded in an update from 16.04 to 18.04? Maybe best to start over with a fresh install. Seems that I may be able to copy my files / settings from Windows so that I can restore them on the fresh install, right? |
Was unable to upgrade from 20.04 to 20.10 (WSL2, with WSLg, Windows 11 (22000.194)). |
Hi when trying
apt-get update
it fails with
Hit:1 http://archive.ubuntu.com/ubuntu xenial InRelease
Hit:2 http://archive.ubuntu.com/ubuntu xenial-updates InRelease
Hit:3 http://security.ubuntu.com/ubuntu xenial-security InRelease
** (appstreamcli:13571): CRITICAL **: Error while moving old database out of the way.
AppStream cache update failed.
Reading package lists... Done
The text was updated successfully, but these errors were encountered: