Questions tagged [linux]
NOTICE: All Linux questions must be related to programming; those that aren't will be closed. Use this tag only if your question relates to programming using Linux APIs or Linux-specific behavior, not just because you happen to run your code on Linux. If you need Linux support, you can try https://unix.stackexchange.com or the specific Linux distribution's Stack Exchange site like https://askubuntu.com or https://elementaryos.stackexchange.com/
linux
227,963
questions
-2
votes
1
answer
47
views
Unable To Create Bottle | Bottles Linux [closed]
Details
Was creating a bottle when it said Unable to create bottle
Log
Generating bottle configuration…
The Wine config is being updated…
Wine config updated!
Running as Flatpak, sandboxing userdir…
...
0
votes
0
answers
75
views
NVIDIA-SMI has failed because it couldn't communicate with the NVIDIA driver on KDE Neon
Overview
So I have installed nvidia-driver-470 using sudo apt-get install nvidia-driver-470 which is recommended by the official website for my GT 730 GPU. Keep in mind I'm a newbie to Linux since I ...
0
votes
1
answer
77
views
Visual Studio Code does not complete installation of remote execution server on Raspberry Pi O/S Buster
In 2002, I was able to successfully connect Visual Studio Code to my Raspberry Pi-based robot and do remote development with VS Code installed on my Windows 10 laptop and the small remote server shim ...
0
votes
0
answers
67
views
How fork() copies pcb
Currently working on adding a feature for linux kernel, I'm trying to add a field for each process.
My idea is to add that new field to the pcb struct and initialize it to 0 for init process.
The ...
0
votes
0
answers
31
views
Unknown symbol __stack_chk_guard
I am trying to write GPIO sysfs driver implementation from stratch. When i use final code, it gives error: Unknown symbol __stack_chk_guard
When I trimmed my code to find which line this error ...
1
vote
2
answers
80
views
Is it possible to stop a pipeline when pressing a key in bash?
I am using a Rpi zero 2w and an old Rpi camera using Rpi OS (Legacy, 64-bit) Lite (i.e. a server linux) to stream a video through my local net. I want to stop the stream remotely from windows using ...
-1
votes
0
answers
29
views
want to get top 'N' cpu consuming process in the system using java default library
is there any builtIn library available in java to get the top 'n' cpu consuming process name and the percentage it's consuming.i want this program to work in any os such as windows,linux.
i tired with ...
-2
votes
0
answers
21
views
Looking for a way to timout docker exec in cronjob
/15 * * * * /usr/bin/docker exec 439b5f929468 python3 /app/metrics.py 2>&1 | /usr/bin/timestamp.sh >> /var/log/dedl-stack/dedl_stack.log
I have a cronjob running every 15 minutes, ...
-9
votes
0
answers
75
views
why i keep getting code::blocks "processe returned 0 (0x0) execution time : 0.59 s press any key to continue"c++? [duplicate]
hello i am a beginner who just started to use code::blocks in Linux mint ide for c++ and i keep getting a weird code (0x0) even though i know that nothing is wrong,and when compiled manually i wont ...
0
votes
0
answers
29
views
Linux Kernel: How to use all ports and avoid WAIT_TIME sockets?
I am building a script for work where I have to scrape massive IP addresses, something like 50 million.
However, when analyzing my program and machine performance, we notice the following:
At least ...
0
votes
2
answers
59
views
Bash child scripts - Timer interuptable by signals - read, timeout and sleep doesn't work
So, I'm on Arch Linux, running i3
I have a slideshow script that changes the background every 5 seconds. And I have a bunch of signals, such as toggle, next, previous, faster, slower. I have all of ...
0
votes
2
answers
156
views
Is there any way to explicitly tell compiler to stop optimization
Linux, C, GCC, ARM (Allwinner H3). Is it possible to get the following equivalent functionality (pseudocode):
#pragma optimizations-stop
#pragma registers-flush
a=10;
while(*b != 0) c++;
if(a == 0) { ...
0
votes
0
answers
15
views
kretprobe handler hooks show BUG: scheduling while atomic
I tried to use kretprobe to hook the umount syscall with a post handler in my kernel module.
static struct kretprobe umount_kretprobe = {
.entry_handler = umount_kprobe_pre_handler,
.handler ...
-2
votes
0
answers
17
views
Docker Desktop KVM Status Discrepancy on Xubuntu (Already Installed) [closed]
I'm encountering a discrepancy between the KVM status reported by Docker Desktop and the confirmation of KVM being loaded on my Xubuntu system.
System Details:
OS: Xubuntu (latest verison)
Docker ...
0
votes
1
answer
94
views
Azure DevOps Pipeline Agent.ToolsDirectory error on self-hosted agent LINUX- RHEL 9 while setting up python under Tool Cache
I have a self-hosted agent that has Python3.9.18 installed which comes as part of RHEL 9 Image. Everytime I run the pipeline I get an error.
##[error]Version spec 3.9 for architecture x64 did not ...
0
votes
1
answer
35
views
How does the socket buffer work in Linux?
I'm using python TCP server, and the clients will just send data to the server via sockets. In Linux, there are the buffer size defined for TCP. So does that mean when the client writes to the socket, ...
1
vote
2
answers
74
views
Switch network interface back to auto/dynamic IP address using C/C++ Linux
There are tons of examples in the Internet about how to set a Static IP address to a network interface under Linux using C language.
One of the most popular is How to set the IP address from C in ...
2
votes
5
answers
81
views
How to insert a character in front of a line one line above a specific character?
In my text file there are many lines whose contents are almost the same. Here are some of them.
So, what I want is to overwrite the / with - on every line and then insert - in front of the line ...
0
votes
0
answers
51
views
If I allocate memory of size multiple pages, will the physical page frames be adjacent to each other?
I've read Linux device driver, Linux Kernel Devlopment and kernel.org and lwn articles but I'm still confused
If I request memory of sizes of multiple page_size,
Will the physical page frames ...
0
votes
1
answer
111
views
compiler optimization issue / variable has wrong value
I define variables as
volatile sig_atomic_t v1;
volatile int v2;
Then in one process (thread) perform
v1 = false;
v2 = 0;
...
v2 = (some_var);
v1 = true;
and in another process (thread)
while(!v1) { ...
-1
votes
0
answers
35
views
Assist with MQTT (Mosquitto) service starting error
I am trying to install the MQTT Broker on our server, but I cannot figure out how to resolve these simple errors. This worked on our previous server (CentOS 7) but now that we moved to Rocky Linux ...
0
votes
1
answer
81
views
Building GCC Cross-Compiler for ARM VxWorks
I am trying to build a cross-compiler from a x86-64 Linux host (Ubuntu-22.04 in WSL, with GCC 11) to arm-wrs-vxworks, and I'm having some serious trouble doing so. I have very limited experience with ...
0
votes
0
answers
58
views
Python3 pip does not see all versions of packages
Let me explain the essence of the problem from beginning to end.
The idea is to set up a kubernetes cluster using kubespray.
One of the steps is to install ansible and other packages described in the ...
-2
votes
1
answer
42
views
Java Process Linux Command Output Redirection
Following command runs and redirects output to file when I run it on RedHat Linux command line:
mycommand &> mycommand.log
I want to run this command using Java but when I do that it displays ...
0
votes
0
answers
34
views
Why does linux deny permission to establish a Java Jsch session when the war file is deployed in a Tomcat server?
I have been trying to establish a Jsch session in a Java Spring Controller, so I can execute a shell script. The session is established and commands are run during local testing and manually testing ...
0
votes
0
answers
45
views
Readin file csv with shared object
I'm trying to create a shared object with Python to read a CSV file to be used by a C application.
I'm having a really hard time doing this.
My code is here:
from cffi import FFI
import csv
import io
...
0
votes
0
answers
13
views
How to execute locally isntalled program on a remote cluster
I'm new to networking so any help is appreciated.
I have a program installed at C:/user/my_program.exe
I have access to a SLURM-based remote cluster on which I can run commands like sbatch, sinfo, etc....
0
votes
0
answers
16
views
MS Office Js Excel Add in deployment
I have developed an excel add in using yeoman and i want to deploy the web application. Can I do it on linux server ? I am planning to update the web url in my manifest and share the manifest to other ...
2
votes
1
answer
74
views
ROracle installation errors on EL8
I am trying to install ROracle package version 1.3-1.1 on R version 4.4.1. The OS is RHEL 8.9, kernel 4.18.0-513.24.1.el8_9.x86_64. I've installed Oracle client 23 including JDBC, ODBC and all ...
-2
votes
1
answer
19
views
How to disable default documentation of tomcat which comes after hitting application url
When ever I am trying to access my appurl like below give me tomcat related details, I want to disable this webpages and it should give me 404 Not Found message.
google.com/docs/
google.com/examples/
...
0
votes
1
answer
51
views
gopls: failed to install gopls(golang.org/x/tools/gopls@latest):Error:Command failed: /usr/local/go/bin/go install -v golang.org/x/tools/gopls@latest
The go package is installed and go extension is also installed but in my linux it is failing that can be seen in output tab of VScode
Tried reinstalling go extension and the go lang again after ...
0
votes
0
answers
24
views
AWS EC2 : error expanding EBS XFS partition
I need to expand the /home partition in my AWS EC2 instance. I have already added the required storage and trying to follow the article : https://docs.aws.amazon.com/ebs/latest/userguide/recognize-...
0
votes
0
answers
25
views
Ubuntu & dotnet restore : error NU1301: Unable to load the service index for source https://mycorporatenexus.org/repository/nuget.org-proxy/index.json
I am struggling in restoring a .NET solution on an ubuntu VM.
When I run the command dotnet restore I always get the error:
error NU1301: Unable to load the service index for source https://...
0
votes
0
answers
58
views
vs code wont run with multiple cpp files [duplicate]
hello i am a beginner and currently following learncpp 2.8 on how to use multiple code files which i was able to build and run manually but build and fail to run in vs code despite setting tasks.json ...
0
votes
0
answers
20
views
OpenSuse Leap Micro 6.0 error to refresh repository Problem retrieving files from 'repo-main (6.0)'
please help me to solve this issue.
I installed opensuse leap micro 6.0 on my virtual machine.
when I want to install git, it show error. then, I tried to refresh my repo. I got this error
sudo zypper ...
-2
votes
0
answers
13
views
I want to connect to my SIM card virtually so I can dial USSD code
I have a SIM that I want to connect to my server so that I can be sending some USSD to the SIM from my application without relying on third party services. All information would be highly appreciated.
...
0
votes
1
answer
44
views
How to fix Phantom process in termux while running nethunter
I was running nethunter in termux after some time it , termux got crashed. The error message was "phantom process disabled" I started it several times same thing happened is there any way I ...
0
votes
0
answers
17
views
How to avoid races with process IDs when reading /proc
As I understand it, on Linux process IDs are reused, and also the only API for a lot of process-related stuff (e.g. finding child processes of a specific process) is /proc/<pid>/....
But don't ...
0
votes
0
answers
55
views
When writing my own lex/yacc, my code that was cpmpiled by g++ producted a weird bug
Could you please help me identify where the issue might be in my code, or is there possibly a problem with the compiler itself?"
I was writing my own lex/yacc by cpp. There is some codes for ...
0
votes
0
answers
44
views
How to give all permissions to input group for rust? [closed]
i'm using rdev = { version = "0.5.3", features = ["unstable_grab"] } crate on Debian Bookworm in VSCode, to create my first pet-project and stack with problem:
Error: IoError(Os { ...
1
vote
1
answer
31
views
ValueError: Type names and field names must be valid identifiers: 'Content-Type'
when I use
from allpairspy import AllPairs
parameters = OrderedDict([('Content-Type', ['"application/json"', ' "application/xml"'])]
test_cases = list(AllPairs(parameters))
it ...
1
vote
1
answer
77
views
Getting error when trying to install Pandas using pip
I am trying to install Pandas.
I did:
pip install pandas
And I tried other versions:
pip install pandas=2.2.1
Always the same error:
root@thinkpad:/# pip install pandas==2.2.1
Collecting pandas==2.2....
0
votes
0
answers
35
views
Docker error /bin/sh: 1: /usr/bin/dnf: not found
I'm working on a password manager project, and I developed on Fedora 40 in a pretty quick way, now I'm trying to make a .exe file to deploy my project on Windows, so I built the .exe file with ...
0
votes
0
answers
47
views
How to setup rust LAPACK wrappers?
This has been asked before with no good answer.
As an MVE one can try this:
use lapack::*;
fn main() {
let n = 3;
let mut a = vec![3.0, 1.0, 1.0, 1.0, 3.0, 1.0, 1.0, 1.0, 3.0];
let mut w =...
0
votes
0
answers
33
views
How can I declare a pointer to a constant struct literal that uses a flexible array in C if possible? [duplicate]
So I wanted to store some constant text and data for parts of a level in a game in a struct, then put pointers for all those structs in a struct for each level, and pointers for all the level structs ...
0
votes
0
answers
36
views
asio::stream_descriptor for async read from stdin in raw mode crashes
I want to poll stdin asynchronously for terminal keyboard events, hence the following
/* class tui contains a member 'stdin_' of type 'asio::stream_descriptor',
initialized as such : stdin_{...
2
votes
1
answer
63
views
Fail to hook argv of execve with kretprobe
I tried to hook syscall __x64_sys_execve with kretprobe. So in the entry handler, I tried to get its params, and use strncpy_from_user to get the char* filename, (char**)argv.But after I compiled the ...
-2
votes
0
answers
50
views
certificate validation keeps failing because crls are not found in docker
I have a few self-signed certificates that are accompanied with crl files.
In my docker file I copy those certificates like this:
COPY Certificates /usr/local/share/ca-certificates/
RUN update-ca-...
0
votes
1
answer
102
views
HTTP persistent connection with poll()
On successfully creating the listening socket, I try to run a block of code on it that should maintain a persistent connection. Here is what I have done so far:
while(1) {
struct pollfd pfds[1];
...
0
votes
2
answers
55
views
Socat child processes not terminating after client disconnect
I'm using socat to forward traffic from a local port to a remote server over SSL. My command is as follows:
socat -d -d TCP-LISTEN:1234,fork,reuseaddr OPENSSL:192.168.1.2:1234,verify=0
However, I'm ...