How to correctly build a project with i386 dependency? - linux

I am trying to put this https://github.com/zhelnio/schoolRISCV on vm Linux primary2 5.4.0-113-generic #127-Ubuntu SMP Wed May 18 14:34:18 UTC 2022 aarch64 aarch64 aarch64 GNU/Linux.
There is a line like this in the makefile:
sudo dpkg --add-architecture i386
I end up with a similar thing:
E: Failed to fetch http://ports.ubuntu.com/ubuntu-ports/dists/focal/main/binary-i386/Packages 404 Not Found [IP: 185.125.190.39 80]
I read the article from here https://stackoverflow.com/questions/30316812/ubuntu-apt-get-unable-to-fetch-packages , but it didn't help as I don't see anything like this http://us.archive.ubuntu.com/ubuntu/

Related

pyAlsaaudio install on openSUSE

I'm trying to install pyAlsaaudio on my openSUSE distro
Output of uname -a: Linux linux-0cd5 4.12.14-lp150.12.48-default #1 SMP Tue Feb 12 14:01:48 UTC 2019 (268f014) x86_64 x86_64 x86_64 GNU/Linux
I downloaded the source from this link,
http://larsimmisch.github.io/pyalsaaudio/pyalsaaudio.html
which includes a py setup file.
Initially I didn't have the gcc compiler installed, so I just installed it.
Snipped output of gcc -v: gcc version 7.3.1 20180323 [gcc-7-branch revision 258812] (SUSE Linux)
The setup.py file is still giving me issues, I think because I am missing the alsa/asoundlib.h file, similar to this thread:
https://ubuntuforums.org/showthread.php?t=1586707
However, the solution there doesn't work for openSUSE, there isn't a libasound2-dev available for openSUSE.
Any ideas?
I just found an answer for this here:
https://mailman.alsa-project.org/pipermail/alsa-devel/2013-December/069794.html
I used the following command:
sudo zypper install -C 'pkgconfig(alsa)'
which pointed me to a package I wasn't aware of - "alsa-devel". I wasn't able to find this package when I searched for things like "libasound"
Now I have the proper alsa/asoundlib.h file which is something that the creators of pyalsaaudio note could cause issues if it is absent.
setup.py compiles without issues now! Hope this helps someone else avoid losing 2 hours of googling!

Failed to execute "yum list": Errno 5] OSError: [Errno 2] No such file or directory

OS: Oracle Linux 6
[xxx#host /etc]$ uname -a
Linux slc08yld 2.6.39-400.298.2.el5uek #1 SMP Mon Jan 22 13:08:39 PST 2018 x86_64 x86_64 x86_64 GNU/Linux
The error is that:
[xxxx#host /etc]$ yum list
file://localhost/tmp/common1/x86_64/redhat/50/base/ga/Server/repodata/repomd.xml: [Errno 5] OSError: [Errno 2] No such file or directory: '/tmp/common1/x86_64/redhat/50/base/ga/Server/repodata/repomd.xml'
Trying other mirror.
Error: Cannot retrieve repository metadata (repomd.xml) for repository: base. Please verify its path and try again
The yum.config:
[main]
cachedir=/var/cache/yum
debuglevel=2
logfile=/var/log/yum.log
pkgpolicy=newest
distroverpkg=redhat-release
tolerant=1
exactarch=1
metadata_expire=0
[base]
name=Red Hat Linux - Base
baseurl=file://localhost/tmp/common1/x86_64/redhat/50/base/ga/Server
#baseurl=http://pd-yum-slc-01.us.oracle.com/yum/OracleLinux/EL5/GA/x86_64/base/Server
#[updates]
#name=Red Hat Linux - Updates
#baseurl=file://localhost/tmp/common/AS4.0_u1_x86_64/RedHat/Updates
proxy=http://www-proxy.us.oracle.com:80
Could you please tell what the issue is?
Thanks in advance!
your repo is expecting to find its repository metadata in:
file://localhost/tmp/common1/x86_64/redhat/50/base/ga/Server/repodata/repomd.xml
but it does not exist in that path . first check the path and if the file exist and then clear your yum cache
# yum clean
it will also be good, if you enable DVD Repo instead

Kernel version not correct on ubuntu

I have this situation:
Ubuntu 16.04;
When I called uname -a result is Linux pi 4.1.19-v7+ #858 SMP Tue Mar 15 15:56:00 GMT 2016 armv7l GNU/Linux.
The problem is when I want to compile new drivers, the system gives me the error:
make[1]: *** /lib/modules/4.1.19-v7+/build: No such file or directory. Stop.
But when I looked at /lib/modules/, I find only version 4.4.38-v7+.
Maybe someone knows what it can be?
Thanks.
You need to have kernel-headers installed for the kernel version that you are trying to compile for.
sudo apt-get install linux-headers-$(uname -r)
You have kernel headers for 4.4.38-v7+, but not for your booted kernel of 4.1.19-v7+ (uname -r)
If you don't want to install 4.1.19-v7+ kernel-headers, reboot the system and boot into 4.4.38-v7+, and then try make, and it would compile the module for that particular kernel.

Error while Building initramfs on linux 4.4 on Amazon EC2 ubuntu instance

All,
I downloaded the kernel source tree 4.4.66(from kernel.org) and trying to build the kernel and initramfs from this. Kernel built fine but initramfs is not building properly.
By the I am trying this on Amazon AWS EC2 ubuntu instance
4.4.0-75-generic #96-Ubuntu SMP Thu Apr 20 09:56:33 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux
ubuntu#:~/linux_4.4/linux-4.4.66$ mkinitramfs -o initrd.img
W: mdadm: /etc/mdadm/mdadm.conf defines no arrays.
cp: cannot open '/etc/iscsi/initiatorname.iscsi' for reading: Permission denied
Any idea how to overcome this problem ?

where I can find pthreads for linux

Ok. My last question will be downvoted for spell error. Ok. But I really have not pthreads in my system.
My system :
Linux vps-sohoportal.hspheredns.com 2.6.18-294.26.1.el5.lve0.8.18xen #1 SMP Thu Feb 24 12:15:18 EET 2011 x86_64 x86_64 x86_64 GNU/Linux
when I try to cinfigure sphinx have error:
configuring Sphinx
checking for CFLAGS needed for pthreads...
checking for LIBS needed for pthreads...
checking for pthreads... configure: error: no working pthreads library found
Please Help
Find the pthread-stubs package of your distribution. Check in your package manager.
If you can't find it, it should be shipped with your compiler.

Resources