apt in Linux Subsystem for Windows 10 is failing with 404 Not Found - bash

OK, so this is my first SO question so I'm gonna try my best to lay this out.
I have a Windows 10 laptop on which I am trying to install gcc. I have in the past tried alternatives such as netbeans, cygwin and various emulators and virtual machines all to no avail.
What has been working so far is that I enabled the 'new' windows developer mode which allowed me to download a Linux bash shell from the windows store. It works for all the regular Linux commands, but doesn't have gcc installed.
When I type in gcc (or gcc --version) in the shell, it prints the following line:
The program 'gcc' is currently not installed. You can install it by typing:
sudo apt install gcc
Which I tried, it then ran through a bunch of installer stuff but consistently seemed to run into errors such as the following:
Err:7 http://archive.ubuntu.com/ubuntu xenial-updates/main amd64 libdpkg- >perl all 1.18.4ubuntu1.2
404 Not Found [IP: INSERT IP ADDRESS HERE ]
where the ip address is different on each error line.
It ultimately fails with the following line:
Unable to fetch some archives, maybe run apt-get update or try with --fix-missing?
I have tried but again I get the same kinds of errors as above.
I would really like to get gcc working in the Windows/Linux shell as it is working great for everything else, and I'm trying to keep the number of programs on my computer to a minimum.
Does anyone know why this isn't working, or how (if possible) I can make it work?
P.S I do need it to be gcc because of school reasons

For what it's worth: I landed on this SO topic after having a similar issue.
What fixed it for me was to run
sudo apt-get update
sudo apt-get upgrade
I guess the repo URLs were too old, even though my Ubuntu was in a recent version.

I just ran into the same thing attempting to install python-pip. According to this article, this happens when you have the Windows 10 Anniversary Update (older) instead of the Creators update (newer). The solution is to either uninstall and re-install Ubuntu, or upgrade it (from 14.04 to 16.04). I found the upgrade to be simple and painless:
sudo do-release-upgrade
To check what you have, before and after via:
lsb_release -a

I had the same problem. Pinging the IP resulted in no response and visiting the website returned a 404.
I found a ppa with most current GCC and registered the PPA and was able to successfully install GCC with it; ppa website. I used GCC to build some software I wanted that was not found with apt-get.
From their page:
sudo add-apt-repository ppa:ubuntu-toolchain-r/test
sudo apt-get update

Try to run Ubuntu application in Windows with an option "Run as Administrator".

Related

nvm install --lts keeps failing no matter what I try.. I already have v12 working properly as default under nvm

On a Ubuntu 20.04 server - I've also tried removing and reinstalling curl as per This SO answer.
This
is also open.. So no idea how to install Node v14 LTS under nvm now..
The readme on the github for NVM says to use the provided install script for Linux installs. This can be achieved with curl or wget:
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.38.0/install.sh | bash
wget -qO- https://raw.githubusercontent.com/nvm-sh/nvm/v0.38.0/install.sh | bash
I recommend that you click the link and read, as their is quite a bit of related info there.
I was interested and just tested it out in a clean docker container (ubuntu:20.04) (as I dont use node that often), and it looked pretty straight forward:
apt-get update -y
apt-get install -y curl
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.38.0/install.sh | bash
source ~/.bashrc
nvm version
# none
nvm install --lts --default
nvm version
# v14.17.0
If it not that, then I would also assume, that the issue is related to your general environment, like network inspection, proxy access or else.
As it is visible from the logs, the checksum process keeps failing in a repeated manner. And there have been issues highlighting that some ISO images can show issue with hashing process due to Windows 10 components. , which implicitly effects the checksum process under a guest environment on VirtualBox.
You can complete the steps provided by VirtualBox team there to resolve this issue, as pointed out on Virtual Box's forum:
it's Hyper-V that is causing the checksum problem you posted about, not the version of Virtualbox.

Install Metatrader 5 on Ubuntu 17.04

I try to install Metatrader 5, on Ubuntu 17.04 (64-bit).
I get stuck, and need somebody to help me to solve this problem.
I've installed wine-2.0.1, which is the latest stable version at the moment, and it's for 64-bit.
Finally, after successfully installing Metatrader 5, on launching the application appears an error window: terminal64.exe, with message:
A debugger has been found running in your system.
Please, unload it from memory and restart your programm.
On wiki.winehq.org, I've found that is needed to install 2 separate versions of wine: 32-bit and 64-bit. I try to do all like in:
https://wiki.winehq.org/Building_Biarch_Wine_On_Ubuntu
, but at the stage "Build 64-bit Wine", for: make clean, I got:
make: *** No rule to make target 'clean'. Stop.
There is a way to really install mt5 on Ubuntu 17.04 ?
Just installed it after suffering a little bit. After seeing many requests from the installer to provide a proxy!
First install the latest Wine from the instructions given in its website for Ubuntu (this is the one that will work!)
sudo dpkg --add-architecture i386
wget -nc https://dl.winehq.org/wine-builds/Release.key
sudo apt-key add Release.key sudo apt-add-repository
https://dl.winehq.org/wine-builds/ubuntu/
sudo apt-get update
Stable branch:
sudo apt-get install --install-recommends winehq-stable
Configure Wine to 32 bits (only your user)
WINEARCH=win32 WINEPREFIX=~/.wine32 wineboot
Install Metatrader 5
WINEPREFIX=~/.wine32 wine start /unix /path/to/mt5setup.exe
Happiness
Finally to run MetaTrader 5 add the following to your .bashrc our .profile. And type metatrader on your terminal.
export WINEPREFIX=~/.wine32
alias metatrader='wine start "C:\program files\metatrader 5\terminal.exe"'
Thanks to #Kaleshwar Chand
I recently installed metatrader5 on ubuntu 17.04, using the instructions found on mql5 thread
basically mt5 is 32 bit and your ubuntu is 64 bit so you need to change arch to 32 bit to install/use it properly
enter into terminal
WINEARCH=win32 WINEPREFIX=/home/user/.wine32 wineboot
replace user with your username
then install with
WINEPREFIX=/home/user/.wine32 wine start /unix /path/to/mtsetup.exe
again replace user with your username
I am running MT5 on Arch,
in my case, a 64bit wineprefix is needed for connect with other apis so...
For install and run it correctly I installed:
wine, wine-mono, wine_gecko, winetricks, playonlinux
winetircks corefonts, winetricks winhttp
libgnutls allowed to skip the required proxy error
MT5 was installed throught playonlinux on a 64bit wineprefix
Follow the steps from office winehq at https://wiki.winehq.org/
and find your OS you are using
Android (WineHQ binary packages for Android)
Ubuntu (WineHQ binary packages for Ubuntu 16.04, 18.04, 19.04, and 19.10)
Debian (WineHQ binary packages for Debian Stretch, Buster, and Bullseye)
Fedora (WineHQ binary packages for Fedora 30 and 31)
MacOS (WineHQ binary packages for macOS 10.8 through 10.14)

VMWare 12.5 doesn't like my gcc-6 under Mint

I'm spending way too muhc time on trying to figure this out, so I decided to ask you guys for a little help.
I downloaded VMWare Workstation 12.5.5 on kernel 4.10.8 (Linux Mint 18.1).
A popup show up saying I don't have gcc >= 6.2.0.
After trying to compile it I realised there's a version hosted on a ppa:
deb http://ppa.launchpad.net/ubuntu-toolchain-r/test/ubuntu xenial
main
sudo apt update
sudo apt install gcc-6
I relaunch vmware and I still get this error. Entering the path manually to /usr/bin/gcc-6 doesn't work either. /usr/bin/gcc-6 -v gives me gcc version 6.2.0 20160901 (Ubuntu 6.2.0-3ubuntu11~16.04)
How can I run VMware on my machine? Thanks! :D

Cannot install Clang on Archlinux

For my second year we need to learn how to use linux (at a beginner level) and our professor told us to use Ubuntu, or ArchLinux if we wanted to learn more. I installed ubuntu and the required tools (he gave us a short list) but Archlinux freeze completly when I try to install clang and I have to recreate a new Virtual machine (I am on a Mac using VMWare) each time
here is the list of tool needed:
emacs
clang (>=3.4)
gcc (>= 4.8)
make
xterm
For each one it works but for clang
Here is the error I get:
image http://img11.hostingpics.net/pics/876673ScreenShot20140906at182459.png
and it doesn't respond anymore so I have to forcequit my VM and reinstall a new one. Has anybody already encountered this error ? Does anybody know what it means ? I tried pacman -Syu but it has not done anything...
Thank you
First It looks like a error that your VM hard drive is broken.
But it just 'maybe'.
Try to reboot it and try install commands again.
If it still can't work try to add -o $(pidof mount.ntfs-3g) to kill_all_wait() in /etc/rc.d/functions and reboot it.

asterisk 11 installation in ubuntu 14.04

I am trying to install Asterisk 11 in Ubuntu 14.04 by following http://blogs.digium.com/2012/11/14/how-to-install-asterisk-11-on-ubuntu-12-4-lts/.
I am getting following error:-
READ THIS OR YOUR BUILD WILL FAIL format_mp3.o
format_mp3.c:39:24: fatal error: mp3/mpg123.h: No such file or directory
compilation terminated.
make[2]: *** [format_mp3.o] Error 1
make[1]: *** [addons] Error 2
You need to run the script to generate those libs:
./contrib/scripts/get_mp3_source.sh
First of all there are numerous dependency changes between Ubuntu 14.04 and Ubuntu 12.04. There are several options in the build interface for asterisk and understanding how they interact is key to getting a good working environment when building from source.
If you're looking to get asterisk up and running so that you can work with it I highly recommend just installing from apt-get. I have several systems in limited production roles. They are running on VMs that perform without issue or complaint. It is not necessary to build from source to run asterisk 11 on Ubuntu 14.04. Asterisk 11 is the default version in the REPO. There are plenty of add-ons that install via apt-get as well.
Just run:
sudo apt-cache search asterisk
For a quick list
I'm aware that this is not a complete answer to your question, but it would provide you with a working asterisk environment in about 30 minutes.
If you do have a reason or situation where in you absolutely must install Asterisk from sources, please provide more detailed information about how closely you followed this guide. Following it to the letter is simply not possible due to library and other changes in Ubuntu.
This guide from FreePBX includes complete working instructions for building Asterisk 11 on Ubuntu 14.04. You will need to allow for changes if you do not want to use the FreePBX GUI.
For beginners I highly recommend AsteriskNow or FreePBX. Be aware that Schmoozecom the company behind FreePBX is now doing development and support for AsteriskNow. This isn't a problem per say, but ...
#Klemorai 's answer worked for me. (I don't have the points to comment on h/er post)
This is what i did
sudo apt-get update && sudo apt-get upgrade and sudo reboot
sudo apt-get install asterisk dahdi asterisk-mp3
sudo apt-get install yate-qt4

Resources