且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

使用apt-get install nginx后重新编译nginx

更新时间:2023-02-02 20:48:20

您不需要先卸载apt-get版本,但这是一个好主意,这样您就不会在无意间使用自定义重新编译程序了.将来会进行"apt-get更新"或类似的系统更新.

You shouldn't need to uninstall the apt-get version first, but it's a good idea so that you don't inadvertantly walk over your custom recompile with an 'apt-get update' or similar system update in the future.

有几个原因可能导致您的重新编译无法正常进行.安装程序是否具有覆盖现有文件的正确权限? .configure是否将已编译的二进制文件与apt-get放在同一位置? (--sbin-path =/如果您想将它安装在.configure上,如果不是/sbin/nginx,则在重新编译时nginx是否正在运行?安装程序可能无法覆盖打开的文件. (您已经重新启动了nginx,对吗?)也许还有其他事情,但这就是我开始寻找的地方.

There are a few reasons your recompile may not have worked. Does the installer have the correct permissions to overwrite the existing file? Is .configure placing the compiled binary in the same place as apt-get? (--sbin-path=/where-you-want-it-installed on .configure, if not /sbin/nginx) Was nginx running when you recompiled? The installer may not be able to overwrite an open file. (You have restarted nginx, right?) Maybe something else, but that's where I'd start looking.