Questions tagged [linux]

81036 questions
1

votes
2

answer
596

Views

Creating a Message Queue using msgget in Linux in a .c file Receiving function not implementing error

I am receiving a error when the msgget runs, my code is giving me a return of this: ':Function not Implemented' when it gets to the msgget line. I have tried many options, I am running UBUNTU on Windows 10 please help, here is my code and the terminal window results: CODE: #include #include #inclu...
Kodinguotaku
1

votes
1

answer
1.1k

Views

Does NodeJS respect Docker virtualization and resource limits?

It is known that some applications aren't aware of Linux kernel isolation and virtualization features such as cgroups. This includes system utils like top, free and ps, but also platforms like Java. I've recently read an article which suggests that when running JVMs in Kubernetes, you should enforce...
Kir
0

votes
0

answer
2

Views

web application in linux environment throws javax.ejb.ConcurrentAccessTimeoutException Unable to get read lock on singleton ejb method

I have deployed EJB web application in tomcat,linux machine. This application connects to AWS RDS through JNDI lookup that presents in @singleton ejb class. Every minute my application prints the DB content in console. In initial startup of application, DB connection is achieved once using @PostCons...
user2728146
1

votes
1

answer
565

Views

What is the signal sent to the process running in the container when k8s liveness probe fails? KILL or TERM

I have a use case to gracefully terminate the container where i have a script to kill the process gracefully from within the container by using the command 'kill PID'.( Which will send the TERM signal ) But I have liveness probe configured as well. Currently liveness probe is configured to probe at...
Beatrix Kiddo
1

votes
1

answer
964

Views

nvm not able to change the system node version using nvm

I am working on some remote linux server, where I want to set node v8.0.0. But it seems this has been set to use v0.10.35 and how much ever I try to use nvm use and set different node version, it doesn't work. Here are the simple code and output: [email protected]:$ nvm debug nvm --version: v0.32.0 $SHELL: /bin/...
kaounKaoun
1

votes
1

answer
2.3k

Views

Install gcc and g++ version < 6 in fedora 27 [closed]

I am installing cuda and tensorflow-gpu on fedora 27. But for building binaries of tensorflow it requires gcc and g++ of version less than 6. Fedora comes with already installed gcc and g++ of version 7.3.1 . Can anyone help me with installing gcc and g++ of older versions ? I've already tried : su...
DEVENDRA MEENA
1

votes
3

answer
203

Views

Linux split a file in two columns

I have the following file that contains 2 columns : A:B:IP:80 apples C:D:IP2:82 oranges E:F:IP3:84 grapes How is possible to split the file in 2 other files, each column in a file like this: File1 A:B:IP:80 C:D:IP2:82 E:F:IP3:84 File2...
Ion Pop
1

votes
1

answer
1.8k

Views

Passing environment variables not working with Docker

I am learning how to pass environment variables to Docker containers. While the following works fine, Dockerfile FROM ubuntu ENV USERNAME='david' CMD echo 'username = $USERNAME' Build & run commands docker build . -t enviro docker run -d enviro docker ps -a gives 2a3a69aa7868 enviro...
AlexScalar
1

votes
1

answer
4k

Views

Package 'libpng12-0' has no installation candidate Ubuntu 18.0.4 [closed]

I'm trying to install WPS office and it depends on libpng12-0 which I can't install due to 'Package 'libpng12-0' has no installation candidate '. I'm running Ubuntu 18.0.4 LTS.
mrefizzy
1

votes
2

answer
1.1k

Views

how to offline install .net core and sdk on linux (RHEL)?

I have to install .net core 2.0 and SDK on Linux machine (RHEL distribution) server, where there is NO internet connectivity. Any help on instructions would be appreciated.
Kushhh Alll
1

votes
1

answer
597

Views

How to run Angular6 E2E tests on Alpine Linux

While trying to run E2E tests using Alpine Linux we have the following mysterious error: E/launcher - spawn (...)/selenium/chromedriver_2.40 ENOENT How to reproduce docker run -it --name my-alpine --rm alpine:latest /bin/ash apk add --update nodejs nodejs-npm chromium \ && export CHROME_BIN=/usr/bin...
hamilton.lima
3

votes
0

answer
28

Views

How to wake up a task sleeping with schedule_hrtimeout before the timeout occurs in linux kernel?

In the Linux Kernel I am putting a task asleep with set_current_state(TASK_INTERRUPTIBLE); schedule_hrtimeout(&next_release_time, HRTIMER_MODE_ABS); That works so far. The documentation says: /* %TASK_INTERRUPTIBLE - the routine may return early if a signal is * delivered to the current task or the...
pixy
1

votes
3

answer
1.1k

Views

Building Angular project lead to heap out of memory

When trying to build an Angular project on a Linux server with -aot flag, I get an error. I tried upgrading my instance to a higher CPU core, more RAM and turn on a SWAP partition but still the error just occur faster. Here's while trying to build from terminal along with the command with the flags...
user2280167
1

votes
2

answer
970

Views

Using files generated by other recipes in Yocto

Note: The general question is in bold at the end of this post. I'm trying to build PostGIS 2.2.7 with Yocto (Rocko) for my Linux i.MX6 based embedded system. First of all, I have installed PostgreSQL 9.4.15 from OpenEmbedded Layers (https://layers.openembedded.org/layerindex/recipe/5558/) and all th...
danlor
1

votes
1

answer
98

Views

how to read chunks from named pipe in bash

i have a command that potentially outputs a lot of data to stdout and I need to upload that via ftp to a remote location. I found this question Upload output of a program directly to a remote file by ftp and I really liked the idea of redirecting the output into a named pipe and then read junks from...
user3347114
1

votes
2

answer
1.2k

Views

Reference assemblies for framework “.NETFramework,Version=v4.7.1” were not found

I try to open a Unity3D project with VSCode under Linux (Ubuntu 18.10). The omnisharp extension doesn't load the project, saying assemblies were not found. It may seems very stupide, but i'm don't really used to .Net yet, and i have been stuck with this error for quite some days now. I have been try...
Eyap
0

votes
0

answer
14

Views

DBD-Oracle-1.76 installation issue

I am setting up a new server for POSTGRESQL, so we have to migrate from ORACLE to POSTGRES while installing DBD-Oracle-1.76 package. However, we are getting error even though we have exported ORACLE_BASE, ORACLE_HOME, LD_LIBRARY, LD_LIBRARY_PATH. Here is what I have tried: make rm -f blib/arch/auto...
Abhinav
0

votes
0

answer
10

Views

bash - file name in the content

would you be able to help me a bit. I try to write a short script which will find in the current directory all files that contain their name in their content. I was trying with the below but still can't find good solution to the problem: #!/bin/bash for i in *; do if [ -f '$i' ]; then z=`cat $i | gr...
axel_87
2

votes
3

answer
76

Views

Set file modification time from the date string present in the filename

I'm restoring a number of archives with dates within their names, something along the lines of: user-2018.12.20.tar.xz user-2019.01.10.tar.xz user-2019.02.25.tar.xz user-2019.04.19.tar.xz ... I want to set each file's modification date to match the date in their filename by piping the filenames to t...
tobiasfried
1

votes
1

answer
49

Views

How to purge the Presto logs by configuration?

Dear friends and collegs we installed before one month the preso cluster we are very surprised about the logs from presto we see that logs are not purged from /home/presto/data/var/log so logs increase the use size on the disk each week for now all logs are around ~100M and on the next month it wil...
Judy
1

votes
1

answer
30

Views

error: positional initialization of field in ‘struct’ declared with ‘designated_init’ attribute [-Werror=designated-init]

I am trying to adjust an old kernel module (written for 2.6.x kernel) for kernel 4.6.x. The code has a struct declaration as seen below: struct tcpsp_sysctl_table { struct ctl_table_header *sysctl_header; struct ctl_table tcpsp_vars[NET_TCPSP_LAST]; struct ctl_table tcpsp_dir[2]; struct ctl_table ro...
kr1stj0n
1

votes
2

answer
42

Views

Multiple values in a single macro definition with __SYSCALL_DEFINEx

I am trying to understand a chunk of code from /include/linux/syscall.h, where a macro definition seems to have multiple values, with semicolons separating each one of them: 235 #define __SYSCALL_DEFINEx(x, name, ...) \ 236 __diag_push();...
xczzhh
1

votes
2

answer
42

Views

Start two never ending python scripts

Is there a proper way to start two python scripts that will never end? I have a Bash Script.. I just want it to start two python server applications on different ports. But obviously as I get to the first python command, it will loop forever is there a way to kill these two python scripts when you k...
billybob2
1

votes
2

answer
35

Views

How does the builtin shell command “type” know the path of given commands?

How does the built-in shell command type know the path of a given command. Does the shell have a table for most used commands that includes the paths of those commands, or does the shell search those commands in the system?
Alp Başar
1

votes
2

answer
76

Views

why is the open() syscall supported on some Linux systems and not others?

I am inlining syscalls. Yes, I understand this is problematic but I have a good reason. I've tracked down my bug considerably and I'm just asking why has __NR_open disappeared on this arm64 Arch Linux system? 5.0.1-1-ARCH #1 SMP Sun Mar 10 15:08:34 MDT 2019 aarch64 GNU/Linux Again, my code is inlini...
Olsonist
1

votes
3

answer
57

Views

grep for a variable that contains “+”

Trying to pickup the second row using grep and it dosent work if it has a '+' character i have tried with fgrep & instead of -P tried with Fx or x and -w but none of them worked. File prereq.txt contains this : WS+1 whatever 2222 WS--1...
Yashas K.M
1

votes
1

answer
49

Views

How to empty an array in bash script

I am trying to get specific information from a bunch of files. Iterating over a list of files,greping for what I need. I know for sure that each grep will give more than 1 result and I want to store that result in an array. After finishing the work specific to file, I want to erase everything from a...
gkr2d2
1

votes
2

answer
43

Views

Using permissions for Linux chmod

I am trying the following way for executing /bin/chmod. from subprocess import Popen, PIPE x = oct(0o755) p = Popen(['/bin/chmod', x, 'test.py']) o,e = p.communicate() When I am using the above script, I am getting the following output [[email protected] ~]$ /usr/local/bin/python3.6 test_chmod.py /bin/chmo...
wonder
1

votes
1

answer
29

Views

Connecting to DB2/400 using GCC on Linux-PowerPC

After a lot research, I decided to ask the question here, therefore, I have not found the answer of how I can do this. I have a system written in C/C ++ which was designed for Linux PowerPC64 BE ( at now, I'm using Debian ) servers, and I need to connect this system to an IBM DB2/400 database, my fi...
Roger
1

votes
2

answer
33

Views

Makefile Produces Errors but Builds Fine?

I'm using a makefile to build several programs. Here's the code: SRCS = prog1.c prog2.c prog3.c TARG = all CC = gcc OPTS = -O LIBS = -lm OBJS = $(SRCS:.c=.o) all: $(TARG) $(TARG): $(OBJS) $(CC) -o $(TARG) $(OBJS) $(LIBS) %.o: %.c $(CC) $(OPTS) -c $< -o [email protected] clean: rm -f $(OBJS) $(TARG) This makefile p...
poppinMartinellis
1

votes
1

answer
64

Views

Linux much faster than Windows when reading data from .txt file and placing into vector. How would I speed up Windows to do the same?

I have .txt files for data (100MB - 700MB). When reading these files and placing them into vectors, Linux does this 20-30x faster. Is this a system issue, or is there something I can do to speed up Windows? I've ran the same code hundreds of times on each system. Both systems have a 64bit compiler...
Lumbeezl
1

votes
2

answer
45

Views

How do I append/add data to an JSON file with Ruby

So I'm trying to add info to my .json file, a first name and a last name, from just running the script via terminal in kali linux. I have not have had much progress I have been searching online for the past 5 hours to find a way to fix this but there has not been much progress. Which leaves me her...
HorseLeg
1

votes
2

answer
20

Views

MySQL table outline not appearing when called from shell_exec in PHP

I'm trying to output a visual table of a MySQL result when I run a PHP program similar to the output if I had run the MySQL query straight from the command line. However, when I run the query through shell_exec it does not output the nice table lines around the data. mysql DB_NAME -e 'SELECT * FROM...
cmr
0

votes
0

answer
5

Views

Why do I get this message: “bash: export: `:./': not a valid identifier” when I open the terminal?

Yesterday this message: bash: export: `:./': not a valid identifier started showing up in my terminal. As well as the color from my name has disappeared. Anybody know how to fix it?
hackerNuB
0

votes
0

answer
3

Views

Stl_relops not found using qt-creator on linux mint

I'm trying to use qt-creator on linux but when my application is build, an error message says that usr/include/c++/7/bits/stl_relops was not found but I have it on /usr/include/c++/7/bits/stl_relops. I've edited my application.pro and included INCLUDEPATH += /usr/include/c++/7/bits/stl_relops but ev...
Felipe Paz
1

votes
0

answer
6

Views

A fatal error has been detected by the Java Runtime Environment: SIGSEGV (0xb) at pc=0x00007f2d738e4137, pid=15464, tid=0x00007f2df6df9700

# A fatal error has been detected by the Java Runtime Environment: # # SIGSEGV (0xb) at pc=0x00007fe8384b42be, pid=27917, tid=0x00007fe83b3fb700**strong text** # JRE version: OpenJDK Runtime Environment (8.0_191-b12) (build 1.8.0_191-b12) # Java VM: OpenJDK 64-Bit Server VM (25.191-b12 mixed mode l...
Kübra
0

votes
2

answer
14

Views

When using makefile, linux header is found, but when functions from the header are called, it says they are implicitly declared

I'm writing a kernel module and I've begun to look into sockets. I've been able to include other linux headers, use their functions, and the makefile will be fine. When I include linux/socket.h, the compiler is able to find the file, but if I call socket() or connect() or such, it says they are impl...
Icarus_Incarnate
0

votes
2

answer
7

Views

Why does excluding a ] to the test command [ not stop script execution?

I have a Bash script as the following. #!/bin/bash if [ '1' -eq '1' then echo 'something' else echo 'some other thing' fi When i execute the script, I get the following output test.sh: line 2: [: missing `]' some other thing which is unclear to me, as I excepted the script to exit with an error. Can...
Vamsi Prabhala
2

votes
2

answer
2.2k

Views

How to read/write a hard disk when CPU is in Protected Mode?

I am doing an OS experiment. Until now, all my code utilized the real mode BIOS interrupts to manipulate the hard disk and floppy. But once my code enables Protected Mode, all the real mode BIOS interrupt service routines won't be available. I have a feeling that I need to do some hardware drivers n...
smwikipedia
1

votes
1

answer
3.6k

Views

Is GNU make wildcard able to match more complex patterns, like a regexp for example?

Let's say I have the following wildcard matches in a makefile: data-files = $(wildcard $(ptdf)/*.png) \ $(wildcard $(ptdf)/*.gif) \ $(wildcard $(ptdf)/*.bmp) \ $(wildcard $(ptdf)/*.jpg) \ $(wildcard $(ptdf)/*.ico) \ $(wildcard $(ptdf)/*.dist) \ $(wildcard $(ptdf)/*.html) Can the wildcard syntax give...
PatlaDJ

View additional questions