Permission denied in build

Asked by Pavel-II

In build get error:
make[1]: Entering directory `/build/buildd/wc-view-0.0.1'
install -m 0755 ./wc-view /usr/bin/
install: cannot create regular file `/usr/bin/wc-view': Permission denied
make[1]: *** [install] Error 1
make[1]: Leaving directory `/build/buildd/wc-view-0.0.1'

My Makefile:
#
BIN=/usr/bin/
make:
        gcc -ggdb `pkg-config --cflags opencv` -o wc-view main.c `pkg-config --libs opencv`
####
clean:
# rm wc-view
install:
# mkdir -p $(BIN)
        install -m 0755 ./wc-view $(BIN)
uninstall:
        rm -rfv $(BIN)wc-view

How to fix this error.

If i`m comment
install:
        install -m 0755 ./wc-view $(BIN)
packet is not a binary file.

Full log http://goo.gl/9yIFO

Question information

Language:
English Edit question
Status:
Answered
For:
Launchpad itself Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
Laura Czajkowski (czajkowski) said :
#1

The simplest work around for this is to upload native packages only - bzr-builder will convert non-native packages to native packages.

Revision history for this message
Laura Czajkowski (czajkowski) said :
#2

Hi, /usr/bin isn't writable during package build which (correctly) is read-only. You should look at installing elsewhere under debian/ instead. For more help on packing why not ask in #ubuntu-packaging and https://wiki.ubuntu.com/PackagingGuide/Complete

Can you help with this problem?

Provide an answer of your own, or ask Pavel-II for more information if necessary.

To post a message you must log in.