Bash (on Windows 10) doesn't locate any package
29,514
You don't have a correctly setup /etc/apt/sources.list
file. Try pasting the following into /etc/apt/sources.list
:
deb http://us.archive.ubuntu.com/ubuntu/ trusty main restricted deb-src http://us.archive.ubuntu.com/ubuntu/ trusty main restricted ## Major bug fix updates produced after the final release of the ## distribution. deb http://us.archive.ubuntu.com/ubuntu/ trusty-updates main restricted deb-src http://us.archive.ubuntu.com/ubuntu/ trusty-updates main restricted ## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu ## team. Also, please note that software in universe WILL NOT receive any ## review or updates from the Ubuntu security team. deb http://us.archive.ubuntu.com/ubuntu/ trusty universe deb-src http://us.archive.ubuntu.com/ubuntu/ trusty universe deb http://us.archive.ubuntu.com/ubuntu/ trusty-updates universe deb-src http://us.archive.ubuntu.com/ubuntu/ trusty-updates universe ## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu ## team, and may not be under a free licence. Please satisfy yourself as to ## your rights to use the software. Also, please note that software in ## multiverse WILL NOT receive any review or updates from the Ubuntu ## security team. deb http://us.archive.ubuntu.com/ubuntu/ trusty multiverse deb-src http://us.archive.ubuntu.com/ubuntu/ trusty multiverse deb http://us.archive.ubuntu.com/ubuntu/ trusty-updates multiverse deb-src http://us.archive.ubuntu.com/ubuntu/ trusty-updates multiverse ## N.B. software from this repository may not have been tested as ## extensively as that contained in the main release, although it includes ## newer versions of some applications which may provide useful features. ## Also, please note that software in backports WILL NOT receive any review ## or updates from the Ubuntu security team. deb http://us.archive.ubuntu.com/ubuntu/ trusty-backports main restricted universe multiverse deb-src http://us.archive.ubuntu.com/ubuntu/ trusty-backports main restricted universe multiverse deb http://security.ubuntu.com/ubuntu trusty-security main restricted deb-src http://security.ubuntu.com/ubuntu trusty-security main restricted deb http://security.ubuntu.com/ubuntu trusty-security universe deb-src http://security.ubuntu.com/ubuntu trusty-security universe deb http://security.ubuntu.com/ubuntu trusty-security multiverse deb-src http://security.ubuntu.com/ubuntu trusty-security multiverse ## Uncomment the following two lines to add software from Canonical's ## 'partner' repository. ## This software is not part of Ubuntu, but is offered by Canonical and the ## respective vendors as a service to Ubuntu users. # deb http://archive.canonical.com/ubuntu vivid partner # deb-src http://archive.canonical.com/ubuntu vivid partner
Then try running apt-get update
again.
Related videos on Youtube
![XEROling](https://i.stack.imgur.com/JxNOX.png?s=256&g=1)
Comments
-
XEROling almost 2 years
I have installed Bash on Ubuntu on Windows (after enabling the feature in settings)
I don't remember what I did, but the result was that
apt-get
doesn't locate ANY packageWith and without
sudo
:$ apt-get install <package> Reading package lists... Done Building dependency tree Reading state information... Done E: Unable to locate package <package>
I tried many fixes found on this site, like:
apt-get upgrade
&apt-get update
& I tried recreating
resources.list
usingnano
How could this be fixed?
-
AlwaysTalkingAboutMyDog about 8 yearsYou did something you can't remember? Can you check your
history
? -
Christopher B. Adkins about 8 yearsWhat is the output of
grep -v '#' /etc/apt/sources.list
? -
XEROling about 8 years@Zzzach... found in history:
em /etc/apt-/sources.list
rm /etc/apt/sources.list
rm /etc/apt/sources.list.save /etc/apt/sources.list
-
XEROling about 8 years@FlorianDiesch out:
deb http://archive.ubuntu.com/ubuntu trusty main universe restricted multiverse
-
AlwaysTalkingAboutMyDog about 8 yearsAlright, I was wondering if the
history
command outputting anything, maybe the command you did earlier that caused the problem. Doesapt-get update
work properly, outputting various downloading lines? -
Thomas Ward about 8 yearsI don't think this is even supposed to work - Bash on Windows 10 is NOWHERE near stable enough, and has a lot of issues reaching out to the Web. it's also sandboxed, so I would NOT believe that apt-get would work just yet.
-
XEROling about 8 years@Zzzach...
apt-get update
gives 1 line output only, and it's strange. NOTE: see my old comment i edited it -
XEROling about 8 years@ThomasW. It wasn't connecting to internet at the begining but it does now, after editing
/etc/resolv.conf
-
AlwaysTalkingAboutMyDog about 8 yearsUh, well, the
rm /etc/apt/sources.list...
is the problem. You don't have any source destinations setup... -
XEROling about 8 years@Zzzach... how to recreate it correctly?, note that i created it again after removing with that command, (generated using repogen.simplylinux.ch)
-
AlwaysTalkingAboutMyDog about 8 yearsHmm, try the answer I just posted. If it still doesn't work after that, let me know.
-
Tore Aurstad over 4 yearsapt-get update --fix-missing helped me out - WSL not getting any packages
-
-
XEROling about 8 yearsdone, update output error: dpaste.com/351W8AN
-
XEROling about 8 years
ping: icmp open socket: Socket type not supported
NOTE: i remember that apt-get out was like that before the problem, so apt-get problem solved probably -
AlwaysTalkingAboutMyDog about 8 yearsThen I don't think your
/etc/resolve.conf
is setup correctly. Take a look at this maybe. (and btw, I'll try to keep helping you in an hour). -
XEROling about 8 yearsI read the thread from the begining and found that i tested all, and now i tested a command in CMD:
lxrun /update
which i think is equal toapt-get upgrade
in Bash, Out: dpaste.com/0V8JTGG -
AlwaysTalkingAboutMyDog about 8 yearsThere is still something wrong with your network. Seems like it might be something more than just Ubuntu's fault, though. The one bug report on BashOnLinux's github is still open. As someone else commented, this setup is really new, and really unstable. I would look for help from a developer or make a bug request on the git hub link before (or try to find a forum for BashOnWindows).
-
XEROling about 8 yearsso it's ok... at least i have a normal Ubuntu on Windows, i mean i have it like others, without extra bugs made by me
-
XEROling about 8 yearsLet us continue this discussion in chat.