安裝非預設版號 certbot apache plugin / installing certbot apache plugin with non-default version number
IPFS
在大部分情況下安裝預設版本都可以正常無痛完成,但有時候就是會遇到不一樣的情況。
因為有台 server 之前要安裝 route53 plugin,然後要裝預設的版本一直無法下載成功,解決方式就是更新 certbot 版本。但接下來要安裝 apache plugin 的時候就發現 apt-get install 預設版本,沒有出現錯誤訊息,但是實際上執行certbot –apache 的時候會出現錯誤訊息說沒有 apache plugin,才發現雖然安裝時沒有錯誤訊息,但實際上apache plugin無法運作(等同於安裝失敗),原來就是因為版號不對的關係。檢查一下已經安裝的 plugin ,真的沒有 apache plugin存在。
$ sudo certbot plugin Saving debug log to /var/log/letsencrypt/letsencrypt.log - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - * dns-route53 Description: Obtain certificates using a DNS TXT record (if you are using AWS Route53 for DNS). Interfaces: IAuthenticator, IPlugin Entry point: dns-route53 = certbot_dns_route53.dns_route53:Authenticator * standalone Description: Spin up a temporary webserver Interfaces: IAuthenticator, IPlugin Entry point: standalone = certbot._internal.plugins.standalone:Authenticator * webroot Description: Place files in webroot directory Interfaces: IAuthenticator, IPlugin Entry point: webroot = certbot._internal.plugins.webroot:Authenticator - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
解決方式就是透過 pip3 來指定 apache plugin 版本來安裝。(reference)
$ sudo pip3 install certbot_apache==0.40.1
但是這時候又會噴另一個錯誤訊息,說acme版本不對
ERROR: certbot 1.0.0 has requirement acme>=0.40.0, but you'll have acme 0.31.0 which is incompatible.
只好先升級 acme,再來安裝apache plugin
$ sudo pip3 install acme==0.40.1
完成之後檢查 plugin 就可以發現 apache plugin 正常安裝上去了,接下來就可以用 –apache -d 來做 ssl 憑證申請了。
$ sudo certbot plugin Saving debug log to /var/log/letsencrypt/letsencrypt.log - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - * apache Description: Apache Web Server plugin Interfaces: IAuthenticator, IInstaller, IPlugin Entry point: apache = certbot_apache.entrypoint:ENTRYPOINT * dns-route53 Description: Obtain certificates using a DNS TXT record (if you are using AWS Route53 for DNS). Interfaces: IAuthenticator, IPlugin Entry point: dns-route53 = certbot_dns_route53.dns_route53:Authenticator * standalone Description: Spin up a temporary webserver Interfaces: IAuthenticator, IPlugin Entry point: standalone = certbot._internal.plugins.standalone:Authenticator * webroot Description: Place files in webroot directory Interfaces: IAuthenticator, IPlugin Entry point: webroot = certbot._internal.plugins.webroot:Authenticator - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Original link: Phanix's Blog
喜欢我的作品吗?别忘了给予支持与赞赏,让我知道在创作的路上有你陪伴,一起延续这份热忱!