Channels in NixOS with VirtualBox - nixos

nix-channel --list gives no output in my fresh NixOS installation. I used a VirtualBox appliance from https://nixos.org/nixos/download.html.
Do I need to subscribe to a channel?
Why aren't there any channels visible in the VirtualBox installation?
I can install packages just fine, don't I need a channel for that?
I am a NixOS beginner and still trying to grasp the basic concepts.
edit: I was running nix-channel --list with user permissions, whereas sudo nix-channel --list listed a channel as expected...

If you run nix-channel --list as non-root user on a fresh installation of NixOS there will be no output.
That's because root's default channel (nixos) is also available for users. So nix-env called by user will use it.
So you can update both the system profile and user's pkgs (installed via nix-env -i).

You need a binary channel to install software in binary form, instead of building it from source.
It seems channels are not added in VB appliance.
See http://nixos.org/nixos/manual/sec-upgrading.html how to add one.

Related

hwloc + lstopo Failing to Generate Topology on Dual-CPU Machine for Open-MPI

I've been attempting to setup a dual-cpu workstation (Dell Precision 7820) to run local parallel jobs utilizing openmpi 2.1.1-8 (as preinstalled on Ubuntu 18.04) however it fails to run with the following error:
mpirun: pci-common.c:125: hwloc_pci_compare_busids: Assertion `0' failed.
Examining the source code of pci-common.c you can find a comment before the assert(0) line that states nothing should normally reach this point and will abort all debug and non-debug builds. Attempting to generate a system topology map via lstopo (a program within hwloc) also fails with a similar error.
I was able to locally compile a newer release of hwloc (2.0.4 compared to the preinstalled 1.11.9-1) and found that I was only able to get lstopo to generate a topology map when I compiled hwloc using libpciaccess-dev over the standard libpciaccess0 that comes preinstalled. The summary output from making hwloc with the different pciaccess libraries displays the following results
Probe / display I/O devices: PCI(linux) LinuxIO GL
Probe / display I/O devices: PCI(pciaccess+linux) LinuxIO GL
with the former being compiled with libpciaccess0 and the latter being compiled with libpciaccess-dev. Again, the latter is the only one capable of generating a system topology map and I'm under the impression openmpi needs this information to properly scatter jobs on the system. I'm currently unsure how to enforce these version changes to the current openmpi package or if things need to compiled entirely from source. Is there potentially a simpler way to approach this problem?
Problem was solved through trial and error. First, purge installation of openmpi from the system (if installed via apt) by:
sudo apt purge openmpi-bin
sudo apt purge openmpi-common
Then, download hwloc 1.11.13 (ultrastable) from https://www.open-mpi.org/software/hwloc/v1.11/ and extract to a local directory. Enter the hwloc directory and on the command line enter:
./configure
make
sudo make install
After this is completed, install libhwloc5 then openmpi from apt:
sudo apt-get install libhwloc5
sudo apt-get install openmpi-bin
sudo apt-get install openmpi-common
Open-MPI should run as intended now and you should be able to generate system topology by running 'lstopo' and ensure mpi is working by running 'mpirun' without errors.
Hope this helps anyone who has a similar issue in the future!

Install rpm or dpkg with no package manager in embedded Linux

I need to add new functionality to a chinese Linux-based time attendance clock. More specifically I need to make It SNMP capable, which is not available by factory default.
After some research I found a login:password which worked for the TelNet login and managed to get inside the system with root privileges.
The first thing I did was to figure out which Linux distro was It running:
cat /etc/issue throws this:
"PXA Linux Preview Kit
Kernel 2.6.29 on armv5tejl"
I did a quick google search and found that
"PXA Linux is a port of the Linux kernel for PXA based processor based devices and machines."
I dont understand why It's running a PXA Linux Preview Kit on an armv5tejl.
I gave no importance to this fact, and got to the next step: finding which package manager has this system:
I tried several commands:
apt-get, aptitude, rpm, dpkg, yum, slapt-get, ipkg, and several others. None of them worked.
I found that the system had Busybox installed. More specifically BusyBox 1.15.3. In this BusyBox I couldnt find any of those commands. I found that BusyBox does implement rpm and dpkg but this version doesnt have them.
The only command which seems to be "software installation related" I found was the command "install". From BusyBox docs:
"install [-cdDsp] [-o USER] [-g GRP] [-m MODE] [source] dest|directory
Copy files and set attributes"
But probably it doesnt replace the package manager tool. I think that I need to get a way to install dpkg or rpm, and then use them to install the SNMP packages I want. As I read, the lowest level package installation tool is dpkg so I don't have a clue on where to begin.
Can someone give me some advice on how to approach this issue? How can I install a package with no package manager possiblities at all?
You won't be able to install additional software to that system via a package manager. Such devices aren't designed like that. The firmware that was shipped with the device is all there is. What would be the incentive of the device manufacturer to maintain a package repository with general purpose linux software?
But not all hope is lost. You can of course try to compile the needed software yourself (and by that extend the firmware). For that to work you will need a suitable ARM cross compiler (GCC). Via static linking your SNMP package won't have any dependencies to the library versions already on the device (so you don't need a sysroot matching the libraries on the device).

How do I build and run qt/qt creator on Odroid XU3?

I want to run QT-Creator on my Odroid XU3 (ARM Architecture with Lubuntu 14.4) and build an application with it. I've read a lot of on the internet to figure out how to do this but haven't been successful yet. I tried to follow these instructions https://wiki.qt.io/ODROID-XU3 but didn't understand few things.
It states that I need to install some dependencies. I followed the given hyperlink on this site and installed the dependencies using following commands:
sudo apt-get build-dep qt5-default
sudo apt-get install "^libxcb.*" libx11-xcb-dev libglu1-mesa-dev
libxrender-dev libxi-dev
When I searched for my qt5 folder, I could only find qt4 in user/share. What did I do wrong?
It states that I have to setup a toolchain and a sysroot. Do I have to do this only if I want to cross-compile, so compile on a different machine for my Odroid XU3, or also if I just want to compile on Odroid itself?
Let's say I want to setup the toolchain. According to this site I should copy the raspberry pi toolchain (or a different one) into the folder ~/Code/Odroid/toolchain. Problem is I don't see such a folder in my home directory on my Odroid. Should I mkdir one?
Let's also say I want to setup the sysroot, I don't get the part "One is to mount the ODROID-XU3's SD Card or eMMC on your development machine and either make a copy or a link to ~/Code/Odroid/sysroot". Am I right in assuming that I should copy the content of my SD-card to this folder on my developing machine?
Where should I build my QT now - on my development machine or Odroid? (sorry for that stupid question)
What If I want to make it simple and build everything on Adroid XU3 assuming that I have plenty of time and resources. I tried to first install qt and qt creator afterwards but as I started qtcreator, there was no compiler preconfigured and also the QuickView was missing. The terminal was also mentioning that the toolchain is missing. I struggled a lot in order to add these missing components but failed.
Thanks in advance!
to your second point: you can compile it on the Odroid or on your PC. But you should take a look at this: https://wiki.qt.io/Category:QtonPi it should be pretty the same on the Odroid.

lsusb in cygwin environment not working

I have downloaded and installed Cygwin in Windows 8. I connected a USB device and was trying to access it in Cygwin environment.
On typing lsusb i am getting below error. It says lsusb command not found
-bash: lsubs: command not found
I googled and found out that we have to install usbutils if we want to use lsusb. I tried doing it by giving below command but later found out that there is no such package in cygwin package list.
apt-cyg install usbutils
Any idea how to check usb devices connected by giving lsusb in cygwin?
The following worked for me (Thanks to Juan Carlos Muñoz for pointing me in the right direction)
Run your cygwin setup (eg setup-x86_64.exe) - this is the setup, with which you installed cygwin.
Continue to the package selection and search for usbutils and install the one in the System category
Complete the setup.
Now you should be able to use lsusb.
The way to install packages in cygwin is through its setup.exe. Run setup-x86.exe or setup-x86_64.exe depending on your system (32 or 64-bit), and it will show you a list of packages you can install or update. I don't see usbutils, though. I see only a libusb that I have not installed.
Good luck with your search.

How can I install Git to my server which does not have apt-get?

My host is Bluehost. My server is on Linux.
I have tried to follow the tutorial.
You can quite easily compile it from source, with the usual ./configure && make && sudo make install commands.
See "How to install git". Specifically the Mac OS X section (which applies to Linux also)
If the machine doesn't have apt-get, then chances are it isn't a Debian or Ubuntu machine, which means that using a tutorial designed for Debian or Ubuntu is unlikely to get you very far.
Either use the packaged releases for whatever Linux distribution you are running, or build from source.
Get the source from http://git.or.cz/
Maybe you have the same problem I have that I cannot have an outgoing connection but I can have an incoming connection, that´s why I cannot use apt-get. What I do to move files is just use WinSCP and move the files there and after do whatever I want with them.

Resources