I have downloaded libnet-1.0.2a.tar.gz and tried to install it with the following steps.
Location of libnet-1.0.2a.tar.gz:
/usr/nembuild
Now unpacking it and changing directory:
tar -xf libnet-1.0.2a.tar.gz
cd Libnet-1.0.2a
The next commands are for configure and installing:
./configure make && make install
but here I got this error message:
/bin/sh:0 Can't open ./configure
What can I do next? Please show me the correct path of installing libnet-1.0.2a.tar.gz.
Related
I was setting up DWM window manager on debian, but when conpiling it, it came up with an error.
I installed it, then tried to run it with make clean install, but it did not have the make command. I installed it with sudo apt-get install -y make. I tried to run make clean install, but it came up with the error:
make: cc: No such file or directory
make: *** [Makefile:18: drw.o] Error 127
Help?
Doing just make install (sudo if required) the first time should fix the error.
As to why it happens — you probably have a custom Makefile or your rm binary does not understand the -f flag. The upstream Makefile has the following under the clean target:
clean:
rm -f dwm ${OBJ} dwm-${VERSION}.tar.gz
Ensure that your Makefile also passes the -f flag to rm (which means "ignore nonexistent files").
I'm trying to create my own function (using C) in postgres for which I'm referring this doc: http://www.linuxgazette.cz/139/peterson.html
For compiling - I'm referring: Section 33.9.6 . But, when I run below command:
cc -fpic -c example.c
I get this error:
example.c:1:22: fatal error: postgres.h: No such file or directory
#include "postgres.h"
^
compilation terminated.
I have also installed postgresql-server-dev-all package and tried with the solution provided in this link: How to fix 'postgres.h' file not found problem?
Nothing working for me. Please let me know how I can have postgres.h file.
I'm using postgres-12 on centos -7.
First: If you didn't install PostgreSQL from source, make sure that you installed the headers, which are in the -devel package.
If the problem persists even with the headers installed, the reason is that you forgot to tell the compiler where to look for header files:
cc -fpic -I /location/of/postgres/include -c example.c
To find that location, you can use pg_config:
pg_config --includedir
There is a similar --libdir option to show the library path for when you link the executable.
for ubuntu: apt-get -y install postgresql-server-dev-13 after apt-get -y install postgresql-13
When I try to execute sudo opensnoop-bpfcc I get this message:
In file included from /virtual/main.c:4:
In file included from include/linux/sched.h:14:
In file included from include/linux/pid.h:5:
In file included from include/linux/rculist.h:11:
In file included from include/linux/rcupdate.h:40:
In file included from include/linux/preempt.h:81:
In file included from ./arch/x86/include/asm/preempt.h:7:
In file included from include/linux/thread_info.h:38:
In file included from ./arch/x86/include/asm/thread_info.h:53:
./arch/x86/include/asm/cpufeature.h:150:2: warning: "Compiler lacks ASM_GOTO support. Add -D __BPF_TRACING__ to your compiler arguments"
[-W#warnings]
#warning "Compiler lacks ASM_GOTO support. Add -D __BPF_TRACING__ to your compiler arguments"
^
1 warning generated.
Traceback (most recent call last):
File "/usr/sbin/opensnoop-bpfcc", line 127, in <module>
b.attach_kprobe(event="sys_open", fn_name="trace_entry")
File "/usr/lib/python2.7/dist-packages/bcc/__init__.py", line 526, in attach_kprobe
raise Exception("Failed to attach BPF to kprobe")
Exception: Failed to attach BPF to kprobe
I don't understand how to fix it. I've just installed bcc tools using this command
sudo apt-get install bpfcc-tools linux-headers-$(uname -r)
as suggested on the github page https://github.com/iovisor/bcc/blob/master/INSTALL.md#ubuntu---binary
The running OS is 18.04.2 LTS (Bionic Beaver).
I had to compile bcc from source code instead of installing it using the package.
Install linux kernel headers
sudo apt install linux-headers-$(uname -r)
Install required dependencies
sudo apt-get -y install bison build-essential cmake flex git libedit-dev \ libllvm6.0 llvm-6.0-dev libclang-6.0-dev python zlib1g-dev libelf-dev
Compile bcc from source code
git clone https://github.com/iovisor/bcc.git
mkdir bcc/build; cd bcc/build
cmake .. -DCMAKE_INSTALL_PREFIX=/usr
make
sudo make install
#Maicake is right. Compiling and installing from source did work for me. Here are the steps to install on Ubuntu 22.04:
Follow the steps described here. Specifically for Ubuntu 22.04 you may need to make some changes after cloning the bcc repository.
Add the following line to your .bashrc file:
export PATH=$PATH:/usr/share/bcc/tools
Create a symlink to python3 as most of the tools use python (not python3) to run the scripts.
sudo ln -s /usr/bin/python3 /usr/bin/python
I've been trying to get MP4Box installed on my CentOS 7 box using the following instructions:
...
cd extra_libs
cp -r * /usr/local/src/gpac/extra_lib
cd ..
cd gpac
chmod 755 configure
./configure
make lib
make apps
make install lib
make install
cp bin/gcc/libgpac.so /usr/lib
install -m644 bin/gcc/libgpac.so /usr/local/lib/libgpac.so
chmod +x /usr/local/lib/libgpac.so
ldconfig
Everything works fine until I get to ./configure which gives me an error:
./configure: line 354: gcc: command not found
error: zlib not found on system or in local libs
I've removed and reinstalled ZLIB and still no luck. I'm pretty new to CentOS so I'm not sure if the problem is with MP4Box or my CentOS installation. I did read that is could be a location issue, here is what I get when I run a whereis /usr/include/zlib.h /usr/share/man/man3/zlib.3.gz. Thoughts?
It turns out that gcc was not installed. I did a yum install gcc and that resolved my issue.
I can't install MP4Box on CentOS7.3.
CentOS Linux release 7.3.1611 (Core)
I attempted to install with reference to the following URL.
https://www.24x7serversolutions.com/blog/install-mp4box-on-centos/
yum -y install freetype-devel SDL-devel freeglut-devel
wget http://repo.bstack.net/mp4box/gpac-0.4.5.tar.gz
wget http://repo.bstack.net/mp4box/gpac_extra_libs-0.4.5.tar.gz
tar -zxvf gpac-0.4.5.tar.gz
tar -zxvf gpac_extra_libs-0.4.5.tar.gz
cd gpac_extra_libs
cp -r * /usr/local/src/gpac/extra_lib
cd ..
cd gpac
chmod 755 configure
./configure
But, at the time of this command,
make lib
・・・
gcc: エラー: unrecognized command line option ‘-Wl’
gcc: エラー: unrecognized command line option ‘--warn-common’
make[1]: *** [libgpac.so] エラー 1
make[1]: ディレクトリ `/home/source/gpac/src' から出ます
make: *** [lib] エラー 2
I tried to set ln as following.
ln -s /usr/lib64/libglut.so.3 /usr/lib64/libglut.so
But, the same error was displayed.
How do I deal with it?
This is how I installed the latest version of MP4Box from the GitHub. The main purpose of this script is to install the MP4Box to docker centos amazoncorretto container.
yum -y install freetype-devel SDL-devel freeglut-devel ugcc gcc-c++ git libtool make zlib-devel
git clone https://github.com/gpac/gpac gpac_public
cd gpac_public
./configure --static-mp4box
make
make install
This is the combination of two resources:
https://github.com/gpac/gpac/wiki/GPAC-Build-Guide-for-Linux
https://gist.github.com/helpsquad/48ee2baf2eb5ee655e8755618b4c8c75
If you need MP4Box only from GPAC, I recommend that you follow this tutorial.
You need the following packages: git, gcc, make, libpthread-devel.
Execute these command-lines:
git clone https://github.com/gpac/gpac.git
cd gpac
./configure --static-mp4box --use-zlib=no
make -j4
sudo make install
I think there might be a bug in that version of gpac. Try this instead:
yum -y install freetype-devel SDL-devel freeglut-devel
git clone https://github.com/gpac/gpac
cd gpac
git checkout tags/v0.6.1 -b v0.6.1
./configure
make lib
Well it's there on the official "rpmfusion-free" repository.
Just do:
sudo yum install gpac
(Taken from: http://rahul-ghose.blogspot.com/2017/05/install-mp4-box-on-centos.html)
Mp4Box included in gpac, so you must install gpac.
yum install gpac