c - Heroku 应用程序 buildpack 编译成功后失败

标签 c heroku makefile installation buildpack

我正在尝试使用专门为其定制的heroku buildpack 来构建一个C 应用程序。问题是,编译后到达最后阶段 -----> Installing 并失败。有人能够解释我需要做什么才能成功部署它吗?

命令:

$ git clone https://github.com/znc/znc.git && cd znc
$ heroku create --stack cedar --buildpack http://github.com/lonnen/heroku-buildpack-znc.git

Creating dark-clouds-666... 
done, stack is cedar
BUILDPACK_URL=http://github.com/lonnen/heroku-buildpack-znc.git
http://dark-clouds-666.herokuapp.com/ | git@heroku.com:dark-clouds-666.git
Git remote heroku added

$ git push heroku master

...然后它继续构建看似正常的一切...

-----> Fetching custom git buildpack... done
-----> C app detected
-----> Running autogen.sh
-----> Configuring
-----> Compiling with Make

       Linking znc...

       ZNC was successfully compiled.
       Use 'make install' to install ZNC to '/usr/local'.

-----> Installing
       test -d /usr/local/bin || /usr/bin/install -c -d /usr/local/bin
       test -d /usr/local/include/znc || /usr/bin/install -c -d /usr/local/include/znc
/usr/bin/install: cannot change permissions of `/usr/local/include/znc': No such file or directory
make: *** [install] Error 1

 !     Push rejected, failed to compile C app

To git@heroku.com:dark-clouds-666.git
 ! [remote rejected] master -> master (pre-receive hook declined)
error: failed to push some refs to 'git@heroku.com:dark-clouds-666.git'

最佳答案

您的用户没有写入 /usr/local 的权限。通常,make install是由root用户完成的,而make可以由普通用户完成。

最快的方法是由 root 用户执行所有操作,这是不安全的,因为您可以修改所有内容,从而导致系统损坏。

您可以设置与/usr/local不同的安装位置,也可以强制heroku请求root权限(sudo make install)。

关于c - Heroku 应用程序 buildpack 编译成功后失败,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/24905007/

相关文章:

php - 如何在 Heroku 上部署静态 Web 应用程序

docker - make 命令在 Windows WSL Ubuntu 中不起作用

c - 生成文件:错误 1

c++ - 共享内存包含指针

sql - 在 heroku 上的 PostgreSQL 数据库中存储超过 255 个字符

c - 我应该在哪里找到要在C中读取的txt文件

ruby-on-rails - redis 尝试连接到 Heroku 中的本地主机 - 为什么?

c - GDB 无法识别新文件/行

c - 为什么我的空字符数组以长度 6 开头?

c - 定义 C 中标点符号的替代品