Checking version of byobu, got `WARNING: ulimit -u is too low`. What does this mean? - ulimit

Like the question says, this is what I typed in
$ byobu --version
byobu version 5.119
WARNING: ulimit -u is too low
tmux 2.5
I'm not sure what this means.

Related

how can I use --dry-run option in clang-format?

my os is ubuntu 16.04 and I want to use --dry-run option included in clang-format.
but when I write clang-format --help on terminal, it doesn't have --dry-run option.
as I guess it's because of version. when I write sudo apt-get install clang-format I shows me installing clang-format-3.8.
so I wonder
the reason that clang-format does not have --dry-run option is due to version?
2-1. if first question is yes, Is there any way that I can install clang-format version over 10?
2-2. if first question is no, how can I use --dry-run option?
the reason that clang-format does not have --dry-run option is due to version?
Yes, --dry-run was added in Nov
2019
when Clang 10.0.0 came out.
if first question is yes, Is there any way that I can install
clang-format version over 10
You could either upgrade your Ubuntu installation as clang-format 10
is available in newer
systems
or build it manually but the easiest and most preferred way these days
is to run official Ubuntu docker
image:
$ docker run -it ubuntu
root#502d5d8cfb26:/# head -n2 /etc/os-release
NAME="Ubuntu"
VERSION="20.04.1 LTS (Focal Fossa)"
root#502d5d8cfb26:/# apt-get update
root#502d5d8cfb26:/# apt-get -y install clang-format
root#502d5d8cfb26:/# clang-format --version
clang-format version 10.0.0-4ubuntu1
root#502d5d8cfb26:/# clang-format --help | grep -- '--dry-run'
--dry-run - If set, do not actually make the formatting changes
--ferror-limit=<uint> - Set the maximum number of clang-format errors to emit before stopping (0 = no limit). Used only with --dry-run or -n
-n - Alias for --dry-run

OpenCV claims to find "wrong" cuda version

I build OpenCV 3.4. with Cuda 10.0 support in "/usr"local/opencv_custom" like this:
cmake -D CMAKE_BUILD_TYPE=RELEASE
-D CMAKE_INSTALL_PREFIX=/usr/local/opencv_custom
-D OPENCV_GENERATE_PKGCONFIG=ON
-D OPENCV_DNN_CUDA=ON
-D INSTALL_C_EXAMPLES=ON
-D INSTALL_PYTHON_EXAMPLES=ON
-D OPENCV_EXTRA_MODULES_PATH=/home/ohmnibot/opencv_contrib/modules
-D BUILD_EXAMPLES=ON
-D BUILD_opencv_python2=OFF
-D WITH_FFMPEG=1
-D WITH_CUDA=ON
-D WITH_OPENGL=ON
-D ENABLE_FAST_MATH=1
-D CUDA_FAST_MATH=1
-D WITH_CUBLAS=0
-D WITH_LAPACK=OFF
-D BUILD_opencv_cudacodec=OFF
-D CUDA_VERSION=10.0 ..
All is fine but when I try to include this opencv version in my CMakeList like this
set(OpenCV_DIR "/usr/local/opencv_custom")
find_package(OpenCV REQUIRED)
I get this error:
Could NOT find CUDA: Found unsuitable version "10.2", but required is exact
version "10.0" (found /usr/local/cuda-10.0)
Now I had cuda 10.2 installed but I removed every possible trace of it and only cuda 10.0 exists on my system (as far as I know).
Also I just don´t get this message.... cuda 10.0 has been found but its unsuitable because its the wrong version even though... well its the right one?
I don´t know this just confuses the hell out of me... any help is deeply appreciated.
I´m working with catkin on a Ubuntu 18.04 system with a GTX 1650.
Old cuda versions have been removed with
sudo apt-get --purge remove "*cublas*" "cuda*" "nsight*"
sudo rm -rf /usr/local/cuda*
nvcc -V output:
nvcc: NVIDIA (R) Cuda compiler driver
Copyright (c) 2005-2018 NVIDIA Corporation
Built on Sat_Aug_25_21:08:01_CDT_2018
Cuda compilation tools, release 10.0, V10.0.130
nvidia-smi output:
+-----------------------------------------------------------------------------+
| NVIDIA-SMI 450.66 Driver Version: 450.66 CUDA Version: 11.0 |
|-------------------------------+----------------------+----------------------+
| GPU Name Persistence-M| Bus-Id Disp.A | Volatile Uncorr. ECC |
| Fan Temp Perf Pwr:Usage/Cap| Memory-Usage | GPU-Util Compute M. |
| | | MIG M. |
|===============================+======================+======================|
| 0 GeForce GTX 1650 Off | 00000000:07:00.0 On | N/A |
| 35% 29C P8 8W / 75W | 447MiB / 3908MiB | 3% Default |
| | | N/A |
+-------------------------------+----------------------+----------------------+
Just in case someone every manages to run into a similar error:
delete all the build files
rebuild
enjoy
I have ran into this problem a few times. The accepted answer has worked for me a few times but not always. I think adding the following brings value to anyone who has similar problems.
Check the values of variables PATH and LD_LIBRARY_PATH
You can check the value like this:
echo ${PATH}
echo ${LD_LIBRARY_PATH}
I had the wrong CUDA version there and I corrected it using a text editor like this:
nano ~/.bashrc
Search for PATH (using nano press ctrl+W to find). I had these at the very bottom:
PATH=$PATH:/usr/local/cuda-11.8/bin
LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/cuda-11.8/lib64
and surprisingly I had wrong CUDA version there. I corrected it using text editor to what I wanted (in my case 11.6).
Note that this only changes the variables. You must check that you really have the right version of CUDA at /usr/local/cuda-* and that your /usr/local/cuda is pointing to the right place. We will check that next:
Check that cuda points to the correct version
As shown here,
cd /usr/local
ls -l | grep cuda
then see which versions of CUDA you see there. For me I have only one but I used to have many
/usr/local$ ls -l | grep cuda
lrwxrwxrwx 1 root root 21 tammi 10 15:15 cuda -> /usr/local/cuda-11.6/
drwxr-xr-x 16 root root 4096 tammi 10 15:16 cuda-11.6
that hints that I don't have any conflicting CUDA installations. But you might have that if you have several versions installed.
This answer might be helpful, too.
Check that OpenCV is searching for the correct version
when you're running the configuration step of OpenCV build, check that the -D CUDA_VERSION is right:
cd build-opencv
cmake -D CMAKE_BUILD_TYPE=RELEASE -D CMAKE_INSTALL_PREFIX=/usr/local -D WITH_TBB=ON -D ENABLE_FAST_MATH=1 -D CUDA_FAST_MATH=1 -D CUDA_GENERATION=AUTO -D WITH_CUBLAS=1 -D WITH_CUDA=ON -D BUILD_opencv_cudacodec=OFF -D WITH_CUDNN=ON -D OPENCV_DNN_CUDA=ON -D CUDA_ARCH_BIN=8.6 -D CUDA_GENERATION=Auto -D WITH_V4L=ON -D WITH_QT=OFF -D WITH_OPENGL=OFF -D WITH_GSTREAMER=ON -D OPENCV_GENERATE_PKGCONFIG=ON -D OPENCV_PC_FILE_NAME=opencv.pc -D OPENCV_ENABLE_NONFREE=ON -D OPENCV_EXTRA_MODULES_PATH=../opencv_contrib-4.x/modules ../opencv-4.x -D INSTALL_PYTHON_EXAMPLES=OFF -D INSTALL_C_EXAMPLES=OFF -D BUILD_EXAMPLES=OFF -D CUDA_VERSION=11.6 -D CUDA_NVCC_FLAGS="-ccbin gcc-8"
then, double check that the prints after this command are what you expect and possibly save them to a text file. They are really helpful:
-- CUDA detected: 11.6
-- CUDA NVCC target flags: -ccbin gcc-8;-gencode;arch=compute_86,code=sm_86;-D_FORCE_INLINES
(skipping many other lines...)
-- NVIDIA CUDA: YES (ver 11.6, CUFFT CUBLAS FAST_MATH)
-- NVIDIA GPU arch: 86
-- NVIDIA PTX archs:
--
-- cuDNN: YES (ver 8.7.0)
--
Add -D CUDA_TOOLKIT_ROOT_DIR
This answer and this thread might be outdated but if nothing else helps you it doesn't hurt to check them.
Check that you really made a clean build
I rebuilt my OpenCV a couple of times but it didn't really help. The reason might be that I didn't remove all OpenCV -related files.
sudo make uninstall
as well as removing associated files:
sudo rm -r /usr/local/include/opencv2 /usr/local/include/opencv /usr/include/opencv /usr/include/opencv2 /usr/local/share/opencv /usr/local/share/OpenCV /usr/share/opencv /usr/share/OpenCV /usr/local/bin/opencv* /usr/local/lib/libopencv*
If you want to be super careful, please also check the output of this
sudo find / -name "*opencv*"
as different versions of OpenCV might have different install directories.
Other
Then, you also have the option of uninstalling OpenCV, removing all build files, uninstalling CUDA and starting from scratch. Make sure you follow the CUDA installation guides carefully and perform all pre- and post-installation steps. In addition, make sure you have followed all installation steps of OpenCV here, here and here. Please check the output of all steps for errors that might have been left unseen earlier.
Remember to make a clean build of your application after reinstalling CUDA and OpenCV as well as restarting your PC and/or refreshing your environment variables.

install openstack magnum on docker

I installed openstack magnum (ocata release) on docker in my controller node because I have installed newton on my host machines and newton binaries did not install correctly but now when I try to run magnum-service list command the output is:
ERROR: Unable to establish connection to http://controller:9511/v1/mservices
then I checked both magnum-api and magnum-conductor logs and there was an error:
ERROR magnum ImportError: No module named profiler
then I tried:
su -s /bin/sh -c "/var/lib/magnum/env/bin/pip install profiler" magnum
but even after installing profiler the error was the same.
Can anyone help?
Tnx to #eandersson now both services are running successfully but I faced another problem and that is when I try to run:
magnum service-list
The result is:
ERROR: 'errors'
So I tried:
magnum --debug service-list
And the result was:
ERROR: 'NoneType' object has no attribute 'replace' (HTTP 500) (Request-ID: req-cbe3a389-1cea-49f6-8472-3275696a67e3)
You are probably missing osprofiler, not profiler
profiler = importutils.try_import("osprofiler.profiler")
profiler_initializer = importutils.try_import("osprofiler.initializer")
profiler_web = importutils.try_import("osprofiler.web")
Try installing it instead.
su -s /bin/sh -c "/var/lib/magnum/env/bin/pip install osprofiler" magnum
By the way, when pip installing something for OpenStack you should be applying the requirements constrains.
-c https://git.openstack.org/cgit/openstack/requirements/plain/upper-constraints.txt?h=stable/ocata
So ideally your command would look like this.
su -s /bin/sh -c "/var/lib/magnum/env/bin/pip install -c https://git.openstack.org/cgit/openstack/requirements/plain/upper-constraints.txt?h=stable/ocata osprofiler" magnum

Change system locale inside a CentOS/RHEL without using localectl?

I'm trying to build a Docker image based on oracle/database:11.2.0.2-xe (which is based on Oracle Linux based on RHEL) and want to change the system locale in this image (using some RUN command inside a Dockerfile).
According to this guide I should use localectl set-locale <MYLOCALE> but this command is failing with Failed to create bus connection: No such file or directory message. This is a known Docker issue for commands that require SystemD to be launched.
I tried to start the SystemD anyway (using /usr/sbin/init as first process as well as using -v /sys/fs/cgroup:/sys/fs/cgroup:ro -v /run thanks to this help) but then the localectl set-locale failed with Could not get properties: Connection timed out message.
So I'm now trying to avoid the usage of localectl to change my system globale locale, how could I do this?
According to this good guide on setting locale on Linux, I should use
localedef -c -i fr_FR -f ISO-8859-15 fr_FR.ISO-8859-15
But this command failed with
cannot read character map directory `/usr/share/i18n/charmaps': No such file or directory`
This SO reply indicated one could use yum reinstall glibc-common -y to fix this and it worked.
So my final working Dockerfile is:
RUN yum reinstall glibc-common -y && \
localedef -c -i fr_FR -f ISO-8859-15 fr_FR.ISO-8859-15 && \
echo "LANG=fr_FR.ISO-8859-15" > /etc/locale.conf
ENV LANG fr_FR.ISO-8859-15

format error while installing wireless adapter

i got problem here. I try to install TL-WN725N by refering to http://blog.pi3g.com/2013/05/tp-link-tl-wn725n-nano-wifi-adapter-v2-0-raspberry-pi-driver/ web
then, when doing this command
sudo modprobe 8188eu
the error is appear like this:
ERROR: could not insert '8188eu': Exec format error
anyone please advice. Thanks
1. uname -r //gives ur rp version number
2. Based on the rp version number choose ur 8188eu tar file from http://www.raspberrypi.org/forums/viewtopic.php?p=462982#p462982
3. wget https://dl.dropboxusercontent.com/u/80256631/8188eu-201xyyzz.tar.gz
4. tar -zxvf 8188eu-201*.tar.gz
5. sudo cp rtl8188eufw.bin /lib/firmware/rtlwifi //not needed anymore if your operating system is above 3.10.33+
6. sudo install -p -m 644 8188eu.ko /lib/modules/`uname -r`/kernel/drivers/net/wireless
7. sudo insmod /lib/modules/3.10.33+/kernel/drivers/net/wireless/8188eu.ko
8. sudo depmod -a
9. sudo reboot
Refer my blog as well

Resources