Issue with Realtek 8811CU installation script - linux

I'm new here, so apologies if this is the wrong forum, but I do need to debug this setup script so it seems appropriate enough.
I bought a USB WiFi chip on Amazon (the Ourlink AC600) which uses the Realtek 8811CU chipset and the installation script it comes with for Linux is giving me errors right off the bat.
I tried more or less to debug but I'm simply awful with shell scripts so I didn't make too much progress. Here's the output of running chmod +x install.sh && /install.sh:
##################################################
Realtek Wi-Fi driver Auto installation script
November, 21 2011 v1.1.0
##################################################
Decompress the driver source tar ball:
tar: Old option 'f' requires an argument.
Try 'tar --help' or 'tar --usage' for more information.
rtl8821CU_WiFi_linux_v5.2.5.1_22211.20170517_COEX20170310-1212.rar
./install.sh: line 25: cd:
rtl8821CU_WiFi_linux_v5.2.5.1_22211.20170517_COEX20170310-1212.rar: Not a
directory
Authentication requested [root] for make clean:
make: *** No rule to make target 'clean'. Stop.
Authentication requested [root] for make driver:
make: *** No targets specified and no makefile found. Stop.
##################################################
Compile make driver error: 2
Please check error Mesg
##################################################
After I figured it was trying to decompress an archive that wasn't there (as the only archive present is a .rar) I edited the script to search for rar files instead (by changing the variable to grep .rar instead of .tar.gz on line 18 and 23). I then changed the tar extraction command to "unrar e" as it was no longer trying to extract a tar ball. When I ran it I got this output. Pastebin as it's rather long.
And while I would go ahead and check the error message, the driver package includes no such references. Evidently next time I should buy from a name brand.
Here's pastebins of the contents of install.sh and the respective Makefile the script uses, as they seem important. If anyone has any ideas, is in need of more info, or has a working driver for the 8811CU, please let me know! As I'm a total newbie when it comes to debugging driver install scripts, any pointers would be appreciated. Thanks in advance.
And I'm on Ubuntu 18.04.1 for reference.

I bought the same thing (Ourlink AC600) from Amazon too two weeks ago. I did not try the Linux driver from the CD because it's dated 2015. I also tried ourlink.us website but the driver download link lead to a dead-end. However, I managed to just install it on my ubuntu box today after some web-digging. Here are my setup/steps:
Dell core duo desktop (wired only) with Ubuntu 18.04.1 (up-to-date via: sudo apt-get update)
Plugin the AC600, turn on desktop, login.
Make sure you have required build package (via: sudo apt-get install linux-headers-generic build-essential git)
git clone https://github.com/gnab/rtl8812au (download with your wired connection. Also, I did this in ~/Downloads dir to keep my home dir clean)
cd rtl8812au
sudo make (Only see one or two warnings saying that some code will never be executed, ignore them)
sudo make install (do this only after the driver is built in step 6)
Reboot, unplug your wired network line.
Log back in and click upper-right corner down-triangle, click wireless connection and set it up.
My Ubuntu box goes wireless now. That's how I did it. Hope this helps!

Related

Cannot get custom kernel to boot - mkinitpcio does not add any modules

1. What I am trying to achieve:
Build a custom kernel so I can install and run Anbox-git from AUR on my Arch laptop. Custom kernel is needed for the package to work.
2. What I did to achieve it:
Download Arch Linux kernel v5.8.5-arch1 from here
I followed the guidelines on tradional compilation Arch wiki to create the custom kernel
Via make nconfig I applied the changes mentioned in the Anbox Arch wiki page.
Via make nconfig I changed EFIVAR_FS option from "M" to "*" to resolve an error from earlier attemps.
Via make nconfig under Location: -> Device Drivers-> Multiple devices driver support (RAID and LVM) (MD [=y])-> Device mapper support (BLK_DEV_DM [=y]) I added a few more options (*) because on earlier builds mkinitpcio gave errors for missing modules for DM_CRYPT, and some more DM_ modules which I cannot easily reproduce (will do if necessary for the answer, but I hope it'll be irrelevant).
After creating the config this way I did:
sudo make modules_install
sudo cp -v arch/x86_64/boot/bzImage /boot/vmlinuz-linux58ac
sudo cp /etc/mkinitcpio.d/linux.preset /etc/mkinitcpio.d/linux58ac.preset
Adapted the preset file per Arch wiki instructions
sudo mkinitcpio -p linux58ac
Important: The mkinitpcio runs fine, but keeps giving me a warning:
WARNING: No modules were added to the image. This is probably not what
you want.
sudo grub-mkconfig -o /boot/grub/grub.cfg
3. Expected result:
I am able to reboot, select the new kernel from grub menu, get the usual LVM password prompt, and launch into it without problems.
4. Result I get:
I can reboot and select new kernel from grub but when I select it I get a
Warning: /lib/modules/5.8.5-arch1/modules.devname not found, ignoring.
Starting version 246.4-1-arch
ERROR device 'dev/mapper/vg0-root' not found. Skipping fsck.
mount /new_root: special device /dev/mapper/vg0-root does not exist.
You are being dropped into an emergy shell.
I checked and the /lib/modules/5.8.5-arch1/modules.devnamedoes indeed exist. But I think the actual problem is that mkinitcpio doesn't load the correct modules into the custom kernel, causing it to become unbootable.
Any help appreciated!

How can I solve stdarg.h No such file or directory while compiling out-of-tree Linux kernel module?

I have an out-of-tree Linux kernel module that I need to compile. When I execute "make" in the kernel module directory I am getting:
"fatal error: stdarg.h: No such file or directory"
Before starting the build I installed the header file based on my Linux distribution.
$sudo apt-get install kernel-headers-$(uname -r)
How can I solve this compilation error? (my distribution is Ubuntu 16.04 with linux-headers-4.15.0-42-generic)
I ran a search of stdarg.h with the "locate" command to see if I can sport the file on the system.
I got:
/usr/include/c++/5/tr1/stdarg.h
/usr/lib/gcc/i686-linux-gnu/5/include/cross-stdarg.h
/usr/lib/gcc/i686-linux-gnu/5/include/stdarg.h
...
It tells me there is at least one stdarg.h provided by the compiler.
I tried to include the path "/usr/lib/gcc/i686-linux-gnu/5/include" in the kernel module Makefile so stdarg.h can be picked up. It did not work (while building, another reference to stdarg.h in the official kernel header was not being resolved).
I finally created a symlink directly under:
/usr/src/linux-headers-4.15.0-42-generic/include
$sudo ln -s /usr/lib/gcc/i686-linux-gnu/5/include/stdarg.h stdarg.h
This was just enough to solve the compilation issue.
I am wondering if the kernel headers should come with an implementation of stdarg.h by default (that is the first time I encounter this issue). I have also read that the compiler provide one implementation and most of the time it is better to use the compiler version.
Updated note: if the above solution still does not solve the problem:
Before running make again, do a make clean. Do a ls -la in the folder and look for a ".cache.mk" file. If this is still there, remove it and run "make" again. It should solve the problem.
I had the same issue with CentOS 9, and the other answers didn't work for me. Apparently the problem is that in more recent kernels, it shouldn't be <stdarg.h> but <linux/stdarg.h>. With virtualbox guest additions 6.1.34, it correctly checks for kernel with a version of 5.15.0 or more. But my kernel is the 5.14.xx, meaning the include for stdarg.h is wrong.
Solving the issue
Dependencies
Install all the dependencies for the guest edition
gcc make perl kernel-devel kernel-headers bzip2 dkms
Installation
Run the Guest Addition installation like you would normally. It will fail by saying it is unable to compile the kernel modules. That's expected. It will copy all the file we need to the VM disk.
Editing
We now need to edit the erroneous files.
/opt/VBoxGuestAdditions-6.1.34/src/vboxguest-6.1.34/vboxguest/include/iprt/stdarg.h
/opt/VBoxGuestAdditions-6.1.34/src/vboxguest-6.1.34/vboxsf/include/iprt/stdarg.h
On line 48 (may change for different versions), it check for a version of Linux and select the correct header depending on the version. We need to replace if RTLNX_VER_MIN(5,15,0) with if RTLNX_VER_MIN(5,14,0) in both files.
Compile the kernel modules
We can now compile the kernel modules, and the error should be gone.
sudo rcvboxadd quicksetup all
I personally got an error the first time, but then I recompiled without changing anything and it worked.
Remember that it's just a workaround, it may not work with different versions.
If you using Arch Linux with zen-kernel:
sudo CPATH=/usr/src/linux-zen/include/linux vmware-modconfig --console --install-all
I had the same problem with VirtualBox 6.1.0 running archlinux with kernel 6.1.9.
I downloaded VirtualBoxGuestAdditions_7.2.0.iso file from https://download.virtualbox.org/virtualbox/7.0.2/ link(you may select more appropriate to your VirtualBox version) and assigned as an optical drive to virtualbox machine. After start of the system running blkid command on terminal showed the name of CD rom device which was /dev/sr0. then I created iso folder on
/mnt folder
mkdir /mnt/iso
and mounted cd drive to that folder
mount -o loop /dev/sr0 /mnt/iso
after I cd'ed to /mnt/iso
cd /mnt/iso
and manually run VirtualBoxGuestAdditions.run script
sh ./VirtualBoxGuestAdditions.run
which successfully compiled and istalled required virtualbox guest modules.
Now everytime I update kernel version I redo the same procedure. And it work fine.
It also remove old 6.1.0 guest additons folder.

Cytoscape and linux

Trying to install Cytoscape program on linux cytoscape. And I don't know how because first install button transfers me to HTML page and nothing is downloadable. (I have java installed). I tried to download tar.gz file but I am stuck, because there is no configure file and it says I have no permission for it. What should I do?
Once java 11 is installed on your computer try this:
ctrl+alt+T #open Ubuntu's console
cd /home/fulanita/Downloads #this is the directory where my computer has cytoscape.
chmod +x ./Cytoscape_3_8_1_unix.sh
./Cytoscape_3_8_1_unix.sh #3.8.1 is the last version for Ubuntu
the program will start to install
If anyone comes here in search for an answer I found a solution.
You go to you directory where you keep extracted tar.gz
with cd -Folderdestination/ you locate a folderwhere you keep a file named cytoscape.sh, and with command
sudo sh cytoscape.sh
install the program.

./build.sh inari fails trying to build Firefox OS for inari device

I am trying to build firefox os on a Ubuntu 12.04 64 (4Gb RAM,30GB of free space, GCC-4.8.1 and g++4.8.1) following strictly all the steps from developers.mozilla and the true it is not working and I need help from community in the very last step, with my inari device connected in dev mode and visible from adb devices ./build.sh inari is giving me this error:
Blob setup script has changed, re-running Pulling files from
**../../../backup-inari** cat: **../../../backup-inari/system/build.prop**: No such file or directory Found firmware with build ID Pulling "`libOmxAacDec.so`" cp: cannot stat
**../../../backup-inari/system/lib/libOmxAacDec.so'**: No such file or directory Failed to pull `libOmxAacDec.so`. Giving up.
Build failed!
Build with `|./build.sh -j1|` for better messages
If all else fails, use |rm -rf objdir-gecko| to clobber gecko and |rm -rf out| to clobber everything else.
i tried also doing this rm stuff and start from the beginning with ./config.sh with the same result
This error seems to be causing because you either have a different version from what the builder is expecting. Or that you don't have root access to the device.
It is because of this bug: https://bugzilla.mozilla.org/show_bug.cgi?id=1121600
Please, report it and I could take it a look. Tell what branch are you trying to compile and any other relevant information.

Broken dependencies

I deleted contents of /opt , and now, spotify and google chrome won't work because I deleted their dirs. If I try to remove them, fix them, upgrade them or anything, I get this:
xdg-icon-resource: size argument must be numeric
Try 'xdg-icon-resource --help' for more information.
enter code heredpkg: error processing package google-chrome-stable (--remove):
subprocess installed pre-removal script returned error status 1
xdg-icon-resource: size argument must be numeric
Try 'xdg-icon-resource --help' for more information.
A part of this is translated, but only a small part.
I have tested this on my machine by deleting my /opt folder and then reviving google-chrome. So i know it works. Kindly follow the following steps in order to revive your google-chrome:
Download the google chrome debian file from this link according to your OS.
After downloading it open a terminal windows in the location of the debian file and run the following command to re-install google-chrome
sudo dpkg -i yourgooglechromedebianfile.deb
Your google-chrome is up and running again. :)

Resources