Sample Header Ad - 728x90

How to install gcc-5 on Debian 8.10?

0 votes
1 answer
865 views
I am trying to install gcc-5 on debian 8.10 on a beaglebone green. I have looked at many threads, of which the following was the most promising. https://unix.stackexchange.com/questions/284817/how-to-install-gcc-5-on-debian-jessie-8-1 When I try to follow the instruction of echo "deb http://ftp.us.debian.org/debian unstable main contrib non-free" >> /etc/apt/sources.list.d/unstable.list I get an error, similarly when I try the same with sudo. If I elevate the user, using sudo su -, It seems I am successful. debian@beaglebone:~$ echo "deb http://ftp.us.debian.org/debian unstable main contrib non-free" >> /etc/apt/sources.list.d/unstable.list -bash: /etc/apt/sources.list.d/unstable.list: Permission denied debian@beaglebone:~$ sudo echo "deb http://ftp.us.debian.org/debian unstable main contrib non-free" >> /etc/apt/sources.list.d/unstable.list -bash: /etc/apt/sources.list.d/unstable.list: Permission denied debian@beaglebone:~$ sudo su - root@beaglebone:~# echo "deb http://ftp.us.debian.org/debian unstable main contrib non-free" >> /etc/apt/sources.list.d/unstable.list root@beaglebone:~# cat /etc/apt/sources.list.d/unstable.list deb http://ftp.us.debian.org/debian unstable main contrib non-free root@beaglebone:~# exit logout debian@beaglebone:~$ sudo cat /etc/apt/sources.list.d/unstable.list deb http://ftp.us.debian.org/debian unstable main contrib non-free debian@beaglebone:~$ Continuing, sudo apt-get update all seems fine. debian@beaglebone:~$ sudo apt-get update Ign http://deb.debian.org jessie InRelease Hit http://repos.rcn-ee.com jessie InRelease Hit http://deb.debian.org jessie-updates InRelease Hit http://deb.debian.org jessie/updates InRelease Hit https://deb.nodesource.com jessie InRelease Hit https://deb.nodesource.com jessie InRelease Hit http://ftp.us.debian.org unstable InRelease Hit http://deb.debian.org jessie Release.gpg Hit http://deb.debian.org jessie Release Get:1 http://repos.rcn-ee.com jessie/main armhf Packages [987 kB] Get:2 http://deb.debian.org jessie-updates/main armhf Packages [20 B] Get:3 http://deb.debian.org jessie-updates/contrib armhf Packages [20 B] Get:4 https://deb.nodesource.com jessie/main armhf Packages [980 B] Get:5 http://deb.debian.org jessie-updates/non-free armhf Packages [20 B] Get:6 http://deb.debian.org jessie/updates/main armhf Packages [961 kB] Get:7 https://deb.nodesource.com jessie/main Sources [20 B] Get:8 https://deb.nodesource.com jessie/main armhf Packages [765 B] Get:9 http://ftp.us.debian.org unstable/main armhf Packages [11.9 MB] Get:10 http://deb.debian.org jessie/updates/contrib armhf Packages [994 B] Get:11 http://deb.debian.org jessie/updates/non-free armhf Packages [4,393 B] Get:12 http://deb.debian.org jessie/main armhf Packages [8,898 kB] Get:13 http://ftp.us.debian.org unstable/contrib armhf Packages [61.4 kB] Get:14 http://ftp.us.debian.org unstable/non-free armhf Packages [78.7 kB] Get:15 http://deb.debian.org jessie/contrib armhf Packages [44.3 kB] Get:16 http://deb.debian.org jessie/non-free armhf Packages [74.9 kB] Fetched 23.0 MB in 1min 22s (281 kB/s) Reading package lists... Done debian@beaglebone:~$ **But when I try the last instruction of:** apt-get install -t unstable gcc-5 It does not work: as default user: debian@beaglebone:~$ sudo apt-get install -t unstable gcc-5 Reading package lists... Done Building dependency tree Reading state information... Done E: Unable to locate package gcc-5 debian@beaglebone:~$ The same happens if I elevate user: root@beaglebone:~# apt-get install -t unstable gcc-5 Reading package lists... Done Building dependency tree Reading state information... Done E: Unable to locate package gcc-5 root@beaglebone:~# I am using this kernel image [Debian 8.10 2018-02-01 4GB SD SeeedStudio IoT](https://debian.beagleboard.org/images/bone-debian-8.10-seeed-iot-armhf-2018-02-01-4gb.img.xz) I need to run this specific image because it is the most recent image that supports the HDMI Cape . I am trying to run a node.js server as well as C/C++ code. Being unable to run the node.js server and the app boiled down to not having the correct version of gcc because: whenever I run node server.js, I get the following error: My host has gcc version 9.4, and node js version 10.19 Yes I ran, sudo npm cache clean -f sudo npm install -g n sudo n stable on both host and target. I also followed the debian 8 guide to install different versions of nodejs, the same issue persists. https://www.digitalocean.com/community/tutorials/how-to-install-node-js-on-debian-8 Any help would be appreciated.
Asked by big friendly giant (9 rep)
Apr 10, 2022, 08:56 AM
Last activity: Apr 11, 2022, 01:31 PM