Homebrew and Permission denied issue - macos

I try to compile and install libapreq2 via Homebrew package manager.
brew create http://www.apache.si//httpd/libapreq/libapreq2-2.13.tar.gz
The content of the libapreq2.rb formula is as follows.
require 'formula'
class Libapreq2 < Formula
url 'http://www.apache.si//httpd/libapreq/libapreq2-2.13.tar.gz'
homepage ''
md5 'c11fb0861aa84dcc6cd0f0798b045eee'
# depends_on 'cmake'
def install
system "./configure", "--disable-debug", "--disable-dependency-tracking",
"--prefix=#{prefix}"
# system "cmake . #{std_cmake_parameters}"
system "make install"
end
end
I proceed with
brew install -vd libapreq2
but unfortunately the compilation ended with errors.
mkdir: /usr/include/apache2/apreq2: Permission denied
make[3]: *** [install-pkgincludeHEADERS] Error 1
make[3]: *** Waiting for unfinished jobs....
/usr/bin/install -c .libs/mod_apreq2.so /usr/libexec/apache2/mod_apreq2.so
install: /usr/libexec/apache2/mod_apreq2.so: Permission denied
make[3]: *** [install-pkglibLTLIBRARIES] Error 71
make[2]: *** [install-am] Error 2
make[1]: *** [install-recursive] Error 1
make: *** [install-recursive] Error 1
Brew try to install some files outside the /usr/local/Cellar/libapreq2/ directory. I wonder how to manage these "permission denied" issues. I tried as root user (i.e., sudo brew install libapreq2), but if I later want to remove the library, only the files in /usr/local/Cellar/libapreq2/ are removed.
Thanks for any pointers.

Try this:
sudo chown -R $(whoami) /usr/local/Cellar/libapreq2/
It works for me!

Your package really shouldn't install anything in the system includes in /usr/include. The place for homebrew packaged includes is /usr/local/include (as symlinks into Cellar). You'll just have to adjust your ./configure invocation to use #{prefix}/include for the includes (probably --incdir or something very similar).

Related

Makefile:77: *** missing separator. Stop

Hi I am trying to install systemC on WSL2, when I run sudo make I seem to be getting this error
Making all in src
make[1]: Entering directory '/home/ryans/systemc-2.3.4/src'
Makefile:77: *** missing separator. Stop.
make[1]: Leaving directory '/home/ryans/systemc-2.3.4/src'
make: *** [Makefile:557: all-recursive] Error 1
I have looked at answers, solution 1 and solution2 but they don't seem to apply to my case because the file in question do not have a space or a tab at line 77.
Seems like the right way to install systemC on WSL is the run the following commands in the uncompressed .tar folder,
sudo aclocal
sudo automake --add-missing
sudo autoupdate
before making the objdir with the other instructions can be followed here.

Installation SystemC 2.3.2 failed

I want to install SystemC 2.3.2 on ubuntu 16.04 So i followd the install file directives:
2. Create a temporary directory, e.g.,
> mkdir objdir
3. Change to the temporary directory, e.g.,
> cd objdir
4. Choose your compiler by setting the CXX environment variable
> export CXX=g++
5. Configure the package for your system, e.g.,
(The configure script is explained below.)
> ../configure
In case you want to install the package in another place than the
top level directory (systemc-2.3.2), configure the package e.g. as
follows:
> ../configure --prefix=/usr/local/systemc-2.3.2
6. Compile the package.
> make
7. At this point you may wish to verify the compiled package by
testing the example suite.
> make check
8. Install the package.
> make install
9. You can now remove the temporary directory, .e.g,
> cd ..
> rm -rf objdir
every step went good until i reached step 8 to install the package ... i get the following error:
user#user-Lenovo-IdeaPad-Y510P:~/systemc-2.3.2/objdir$ make install
Making install in docs
make[1]: Entering directory '/home/anoir/systemc-2.3.2/objdir/docs'
make[2]: Entering directory '/home/anoir/systemc-2.3.2/objdir/docs'
make[2]: Nothing to be done for 'install-exec-am'.
/bin/mkdir -p '/usr/local/systemc-2.3.2/docs'
/bin/mkdir: cannot create directory ‘/usr/local/systemc-2.3.2’: Permission denied
Makefile:380: recipe for target 'install-nobase_docDATA' failed
make[2]: *** [install-nobase_docDATA] Error 1
make[2]: Leaving directory '/home/anoir/systemc-2.3.2/objdir/docs'
Makefile:453: recipe for target 'install-am' failed
make[1]: *** [install-am] Error 2
make[1]: Leaving directory '/home/anoir/systemc-2.3.2/objdir/docs'
Makefile:505: recipe for target 'install-recursive' failed
make: *** [install-recursive] Error 1
I don't understand the problem. What could be my mistake
Default install location need root access. If you don't have it. Try to install it to other location which you have right to access.
For example:
../configure --prefix ${HOME}/SystemC

"libnfc Installation" /usr/lib/libnfc.5.dylib: Operation not permitted

OS X: El Captain
I am trying to install libnfc-1.7.1 as RFID Reader Kiosk for (ACR122U).
It worked on raspberry pi from this url, but the libnfc's installation was unsuccessful on my mac.
had Installed MacPorts-2.3.4-10.11-ElCapitan
Then executed these commands on terminal:
// just comments
sudo port -v selfupdate // stack overflow
sudo port upgrade outdated // suggested by terminal
sudo port install libusb-legacy //source libnfc community website
The rest of the steps were from this link:
wget https://bintray.com/artifact/download/nfc-tools/sources/libnfc-1.7.1.tar.bz2
tar -xvzf libnfc-x.x.x.tar.gz
cd libnfc-x.x.x
./configure --prefix=/usr -sysconfdir=/etc
make
brew update && brew upgrade
sudo make install
a warning showed up while executing "make":
arygon.c:94:22: warning: unused variable 'arygon_error_incomplete_command'
[-Wunused-const-variable]
static const uint8_t arygon_error_incomplete_command[] = "FF0C0000\x0d\x0a";
I even tried:
make clean && make
later on "sudo make install" errored:
~/Downloads/libnfc-1.7.1$ sudo make install
Making install in libnfc
Making install in chips
make[3]: Nothing to be done for `install-exec-am'.
make[3]: Nothing to be done for `install-data-am'.
Making install in buses
make[3]: Nothing to be done for `install-exec-am'.
make[3]: Nothing to be done for `install-data-am'.
Making install in drivers
make[3]: Nothing to be done for `install-exec-am'.
make[3]: Nothing to be done for `install-data-am'.
Making install in .
test -z "/usr/lib" || .././install-sh -c -d "/usr/lib"
/bin/sh ../libtool --mode=install /usr/bin/install -c libnfc.la '/usr/lib'
libtool: install: /usr/bin/install -c .libs/libnfc.5.dylib /usr/lib/libnfc.5.dylib
install: /usr/lib/libnfc.5.dylib: Operation not permitted
make[3]: *** [install-libLTLIBRARIES] Error 71
make[2]: *** [install-am] Error 2
make[1]: *** [install-recursive] Error 1
make: *** [install-recursive] Error 1
The error message is simialr to this issue
The user admin privileges were verified.
An issue was opened on libnfc's github, but no one is answering since February.
Please help me get the libnfc installation sorted out as RFID Reader Kiosk if possible.
I have looked into similar problem. I had a hunch that libusb might be involved.
libsub
normal installtion steps:
./configure
sudo make
sudo make install
After that installing libnfc-1.7.1:
./configure
sudo make
sudo make install
libnfc is running from my mac El Captain.
This is straight fresh from Terminal:
nfc-list uses libnfc 1.7.1
error libnfc.driver.acr122_usb Unable to claim USB interface (Resource busy)
nfc-list: ERROR: Unable to open NFC device: acr122_usb:001:006-072f-2200-00-00
At the moment libnfc is telling something from the terminal, but not recognizing nfc tags.
I will be researching now
this is working:
but not efficient
...up to date possible solutions could be found here:
#330 github
I have attempted most of them except for the ext dummy kernal.

Mulval: installation setup

I am trying to install mulval on my machine following this doc:
http://people.cis.ksu.edu/~xou/argus/software/mulval/readme.html
However, I am not exactly sure how to make changes to the path of XSB, dot and Mulval.
I get the following error when I try to run "make":
~/mulval$ make
(cd src/adapter; make; make install)
make[1]: Entering directory '/home/aditya/mulval/src/adapter'
javac GetCVEID.java -cp :/lib/dom4j-1.6.1.jar:/lib/jaxen-1.1.1.jar:/lib/mysql-connector-java-5.1.8-bin.jar
make[1]: javac: Command not found
Makefile:9: recipe for target 'GetCVEID.class' failed
make[1]: *** [GetCVEID.class] Error 127
make[1]: Leaving directory '/home/aditya/mulval/src/adapter'
make[1]: Entering directory '/home/aditya/mulval/src/adapter'
javac GetCVEID.java -cp :/lib/dom4j-1.6.1.jar:/lib/jaxen-1.1.1.jar:/lib/mysql-connector-java-5.1.8-bin.jar
make[1]: javac: Command not found
Makefile:9: recipe for target 'GetCVEID.class' failed
make[1]: *** [GetCVEID.class] Error 127
make[1]: Leaving directory '/home/aditya/mulval/src/adapter'
Makefile:6: recipe for target 'adapter' failed
make: *** [adapter] Error 2
Any help on getting this installation completed?
Thanks in advance!
Set your MULVALROOT env variable before make:
for instance: export MULVALROOT=/home/aditya/mulval
this error is related to javac, not installed properly:
"make[1]: javac: Command not found"
you can check the version with: javac -version
if not installed, install again with sudo apt install default-jdk
if you have other issues related to lex and/or bison later, install them too:
lex: sudo apt install flex
bison: sudo apt install bison

debuild notify make[1]: go: Command not found

I need to build a deb for my golang program.
When I run debuild -uc -us it tells:
fakeroot debian/rules clean
dh clean
dh_testdir
dh_auto_clean
make[1]: Entering directory `/home/vagrant/zbus'
go clean ./zbus-cli/
make[1]: go: Command not found
make[1]: *** [clean] Error 127
make[1]: Leaving directory `/home/vagrant/zbus'
dh_auto_clean: make -j1 clean returned exit code 2
my go compiler is installed correctly, why it still command not found?
Apparently, I just had this problem and found that a package was missing to use this go command.
On Ubuntu, I had to install the golang-go package.
sudo apt-get install golang-go
Also, I actually just typed go at the terminal and it gave me the same command to type to retrieve that package.

Resources