I have GNU/Linux box, I am trying to install Tensorflow 2.2. Currently I have and when I try to run my code it says So when I try to install Tensorflow 2.2 I get the above error. Any idea how to fix this issue? Update: -Raj Answer TensorFlow 2 packages require a pip version >19.0. https://www.tensorflow.or…
Tag: linux
Change file permission for multiple file paths in a file
I have a file which stores multiple file paths in the file content, as such: Is there a single line command to loop the file paths in the file and set the permission for each of the file paths chmod 644 <file paths in /var/tmp/sample>? Answer Another way to use xargs:
Can a fork child determine whether it is a fork or a vfork?
Within the child process, is there any way that it determine whether it was launched as a fork with overlay memory, or a vfork with shared memory? Basically, our logging engine needs to be much more careful (and not log some classes of activity) in vfork. In fork it needs to cooperate with the parent process …
Is linux perf accurate for measuring cache misses for multithread C program?
Can linux perf measure cache misses for multithread program, or it can only report the result for master thread? I used it on a C program using pthread, it seemed the cache miss number was lower than the expected number. Answer Yes, perf stat is an accurate total across all threads. (Unless your CPU has an er…
Dockerfile build image error: Distribution contains no modules or packages for namespace package
I’m trying to build a docker image of a python project. My project has one dependency package, “my_package” which needs to be install first. It’s a namespace package. I’m having this error when building docker image of this python project. I can pretty much install everything wit…
Arduino Uno blink onboard LED by an assembly code gives error Found no label/variable/constant named PD0
I have found an assembly code as follows blink.asm To blink the onboard LED of my Arduino uno (ATmega328P processor). I tried to compile the code to hex by this command But I receive How to fix these errors? My OS is Ubuntu 16.04. Answer This error tell you that the assembler does not know what you mean by PD…
How does OS kernel get notified when memory is accessed?
As far as I know, OS kernel maintains the translation from virtual address to physical address, and the userspace program uses virtual address, the CPU uses physical address. Since all machine codes are executed by CPU, how does OS kernel know a memory access instruction is taken, and translate the virtual ad…
xcb_poll_for_event causes 100% usage of one cpu core
I’m learning c and messing around with xcb lib (instead of X11) on a raspberry pi4. The problem is that when implementing the events loop with xcb_poll_for_event instead of xcb_wait_for_event, one core of four is 100% full. What am I doing wrong? And is there any benefit of using wait_for_event (blockin…
Should I release data after the use of get_user_pages_fast?
I’m using the get_user_pages_fast, which I allocate a memory buffer in the user and create a pages in the kernel space. Should I free the struct pages** after the use this memory? or call to specific release function? Thanks! Answer From documentation on get_user_pages() (which has similar functionality…
Command ‘indexer’ not found
I have reinstalled sphinixsearch on Ubuntu 18.04 after some messing with maticore search. But now I can not run the indexes: But after reinstalling, the command does not run work either. However I can see that the service is runing: Interestingly the first time that installed sphinix (before removing it and i…