when I do a 'make install' it does not create Directory - permissions

This is my first attempt with autoconf, I changed and added some different code to a utility then I took the make.am and other files I needed, I modified them to work with what I wrote, into the same program. as it worked with that one, all I needed to change was the name and version and main.c and header file names. When I do, configure, then, make, it all goes well. it is when I get to the "make install" then I get this error, and I am not sure why.
Making install in src
make[1]: Entering directory `/home/userx/Dropbox/mhsetroot-MAKE/src'
make[2]: Entering directory `/home/userx/Dropbox/mhsetroot-MAKE/src'
/bin/bash ../config/mkinstalldirs /usr/local/bin
/usr/bin/install -c mhsetroot /usr/local/bin/mhsetroot
/usr/bin/install: cannot create regular file `/usr/local/bin/mhsetroot': Permission denied
make[2]: *** [install-binPROGRAMS] Error 1
make[2]: Leaving directory `/home/userx/Dropbox/mhsetroot-MAKE/src'
make[1]: *** [install-am] Error 2
make[1]: Leaving directory `/home/userx/Dropbox/mhsetroot-MAKE/src'
make: *** [install-recursive] Error 1
it does not let it make a directory. So, I tired it.
mkdir /usr/local/bin/mhsetroot
I get the same error, therefore it is just a permissions problem, right ?
If that is all that it is, then it should work on someone else's computer, just not mine? Also, then what permissions do I need to have set on my "local/bin" so that the "make install" will work without having to be in "sudo" mode first?

Try doing it with
sudo make install
command as you need to have root access for this.
So instead of typing make install in command, whenever you
get permission error, try putting sudo in beginning of command and then enter the root password. It works.
:)

I get the same error, therefore it is just a permissions problem, right ?
Right. It cannot create /usr/local/bin/mhsetroot.
If that is all that it is, then it should work on someone else's computer, just not mine?
It depends on what the permissions of /usr/local/bin is.
Also, then what permissions do I need to have set on my "local/bin" so that the "make install" will work without having to be in "sudo" mode first?
It depends on what the permissions of /usr/local/bin is. Usually you will need root permission to install there (e.g. sudo make install). Alternately, you can set DESTDIR for make install:
make DESTDIR=/some/writable/path install
but that also might need more setup, too (e.g. LD_LIBRARY_PATH).

make && make install is not a single command, it is two.
sudo make && install will execute make as superuser, but the && part is telling make install to wait until the first part has completed. 'make install' is it's own command, so what you need is:
sudo make && sudo make install
This is what I needed to do on slackware to get efl to build. I had exactly the same error as OP (searching it brought me here).
A more common example is
sudo apt update && sudo apt upgrade
where these are more commonly written as 2 lines without the '&&'. You have to sudo both parts.

Related

OpenvSwitch building, installation and testing problem

I am trying to install OpenvSwitch on Ubuntu 18.04.
I have two kernels version which are 5.11.0-27-generic and 5.4.0-42-generic.
I set ./configure to build 5.4.0-42-generic version.
Then I use command 'make modules_install', and I get the following message
"[openvswitch-2.16.2]make modules_install
cd datapath/linux && make modules_install
make[1]: 進入目錄「/home/user/下載/openvswitch-2.16.2/datapath/linux」
make -C /lib/modules/5.4.0-42-generic/build M=/home/user/下載/openvswitch-2.16.2/datapath/linux modules_install
make[2]: 進入目錄「/usr/src/linux-headers-5.4.0-42-generic」
INSTALL /home/user/下載/openvswitch-2.16.2/datapath/linux/openvswitch.ko
INSTALL /home/user/下載/openvswitch-2.16.2/datapath/linux/vport-geneve.ko
INSTALL /home/user/下載/openvswitch-2.16.2/datapath/linux/vport-gre.ko
INSTALL /home/user/下載/openvswitch-2.16.2/datapath/linux/vport-lisp.ko
INSTALL /home/user/下載/openvswitch-2.16.2/datapath/linux/vport-stt.ko
INSTALL /home/user/下載/openvswitch-2.16.2/datapath/linux/vport-vxlan.ko
DEPMOD 5.4.0-42-generic
Warning: modules_install: missing 'System.map' file. Skipping depmod.
make[2]: 離開目錄「/usr/src/linux-headers-5.4.0-42-generic」
/sbin/depmod sed -n 's/#define UTS_RELEASE "\([^"]*\)"/\1/p' /lib/modules/5.4.0-42-generic/build/include/generated/utsrelease.h"
The result seems to be success.
However, I use mininet to set a topology which have three eths connect to a switch.
'mn --topo=single,3 --controller=none --mac'
Next I add a flow that is 'ovs-ofctl add-flow s1 action=normal'
and 'pingall'
The wireshark gets all icmp packets.
I add a code in vport.c in advance.
The code is 'printk(KERN_ERR "\r\n!!!print1 !!!\r\n)"'
However, dmesg doesn't show printk.
I found the 'insmod' command will show the following error
'insmod: ERROR: could not insert module openvswitch.ko: Invalid module format'
Is there anything wrong in my building and installation process?
How can I show printk message in dmesg?

neovim :PlugUpdate produces permission denied on all plugins

When entering in vim and then running :PlugUpdate all the plugins can't be updated because of the error
x <PLUGIN>:
error: cannot open .git/FETCH_HEAD: Permission denied
I was able to upgrade VimPlugin with :PlugUpgrade without any issues.
I was able to update this before without any issues about a month ago, I found an article saying that I need to change the ownership of the directory with chown which I am assuming would need to be done at $ sudo chown -R ~/.config/nvim/ but if I don't need to change owner then I'd prefer not to
I was able to resolve it by changing ownership with $ sudo chown -R $USER ~/.config/nvim/
note make sure to $ echo $USER to make sure that it's the user you wish to change the ownership of the directory

How to fail gitlab CI build?

I am trying to fail a build in gitlab CI and get email notification about it.
My build script is this:
echo "Listing files!"
ls -la
echo "##########################Preparing build##########################"
mkdir build
cd build
echo "Generating make files"
cmake -G "Unix Makefiles" -D CMAKE_BUILD_TYPE=Release -D CMAKE_VERBOSE_MAKEFILE=on ..
echo "##########################Building##########################"
make
I have commited the code that breaks build. However, instead of finishing, build seems to be stuck in "running" state after exiting make. Last line is:
make: *** [all] Error 2
I also get no notifications.
How can i diagnose what is happening?
Upd.: in runner, following is repeated in log:
Submitting build <..> to coordinator...response error: 500
In production.log and sideq.log of gitlab_ci, following is written:
ERROR: Error connecting to Redis on localhost:6379 (ECONNREFUSED)
Full message with stacktrace is here: pastebin.
I have the same problem, i can help you with a workaround but im trying to fully fix it.
1- most of the times he hangs but the jobs keeps on going and actually finishes it, you can see the processes inside the machine, example: in my case it compiles and in the end it uses docker to publish the build, so the process docker doesn't exist until he reaches that phase.
2- to workaround this issue you have to make the data persistent and "retry" the download over and over again until he downloads everything he needs.
PS: stating what kind of OS you are using always helps.

Installing pdfgrep on windows server

I am trying to install the pdfgrep command line utility on a Windows Server 2008 R2 from this sources unfortunaly, I had no idea about what to do with those source files after download it so i seach on stackoverflow related problem and i found a ticket who tell to install cygwin, I have done that but when I make the ./configure, it doesn't work, here are the output I get:
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /usr/bin/mkdir -p
checking for gawk... gawk
checking whether make sets $(MAKE)... no
checking for g++... no
checking for c++... no
checking for gpp... no
checking for aCC... no
checking for CC... no
checking for cxx... no
checking for cc++... no
checking for cl.exe... no
checking for FCC... no
checking for KCC... no
checking for RCC... no
checking for xlC_r... no
checking for xlC... no
checking whether the C++ compiler works... no
configure: error: in `/home/Administrateur/pdfgrep-1.2':
configure: error: C++ compiler cannot create executables
See `config.log' for more details.
So what I still have to install for this to work ?
I know the user found a solution but I didn't have the option of installing Cygwin (for reasons...) and i found a simple solution.
Note: I am running windows 10, so this might not work for Windows below 7.
All you need to do is extract the folder and then go to DOS or command prompt.
There are two ways to go about it now.
Go to the folder itself and run it from there
cd C:\to\where\the\folder\is
pdfgrep -i keyword1|keyword2|etc C:\wherever\the\file\is.pdf
OR
2. run code directly from where ever you are in command prompt
C:\to\where\the\folder\is\pdfgrep -i keyword1|keyword2|etc C:\wherever\the\file\is.pdf
the -i is ignore case (one of pdfgrep options).
Hopefully this helps out other people
Sorry for the useless question, I found it by myself, I just rerun cygwin installer and select a c++ compile before reinstall

Running script in FreeBSD

First steps in FreeBSD: trying to run my installation script. Fast help needed:
# ls
configure
# file configure
configure: Bourne-Again shell script text executable
# ./configure
./configure: Command not found
# configure
configure: Command not found
What is wrong, how can I execute this script?
Do you have bash installed? If not use FreeBSD Ports to install it. Use where bash to find out.
Use the force Luke :)
# pkg_add -r bash
May it be, that your's configure script doesn't have appropriate executions rights. Try to cast:
chmod 777 configure
If it works, fix it to
chmod 764 configure
configure scripts are ultra portable shell scripts. There is no need for bash here. The problem is somewhere else.
What's the first line in the configure script? Maybe a CR/LF snuck in, which is a common cause for a totally misleading error message saying that the script was not found, when it was the interpreter that was not found.
Please try /bin/sh ./configure
Install the bash package using
pkg add bash
or
make -C /usr/ports/shells/bash install clean
By default FreeBSD comes with tcsh and a POSIX compatible FreeBSD sh
On older FreeBSD systems you will need to do
rehash
before you can run it.
First line of this script (#!/usr/bin/bash, i suppose) should be changed to #!/usr/local/bin/bash.
And of course, you should have shells/bash port installed.