“調用-rc.d:initscript freeradius,“強制重新加載”操作失敗。”配置 freeradious-mysql 時

“調用-rc.d:initscript freeradius,“強制重新加載”操作失敗。”配置 freeradious-mysql 時

我正在安裝 freeradius-mysql。

它只是給我一個錯誤。

Errors were encountered while processing:
   freeradius-mysql

我嘗試了很多文章,但他們無法幫助我。重新安裝了很多次但沒有成功。

整體輸出

sudo apt-get install freeradius-mysql
Reading package lists... Done
Building dependency tree       
Reading state information... Done
freeradius-mysql is already the newest version. 0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded. 1 not fully installed or removed. After this operation, 0 B of additional disk space will be used.
Do you want to continue? [Y/n] y
Setting up freeradius-mysql (2.1.12+dfsg-1.2ubuntu8) ...
reload: Unknown instance: 
invoke-rc.d: initscript freeradius, action "force-reload" failed.
dpkg: error processing package freeradius-mysql (--configure):
 subprocess installed post-installation script returned error exit status 1
Errors were encountered while processing:
 freeradius-mysql
E: Sub-process /usr/bin/dpkg returned an error code (1)

sudo apt-get --reinstall 安裝 freeradius-mysql 之後

輸出 :

sudo apt-get --reinstall install freeradius-mysql
Reading package lists... Done
Building dependency tree       
Reading state information... Done
0 upgraded, 0 newly installed, 1 reinstalled, 0 to remove and 0 not upgraded. 1 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
E: Internal Error, No file name for freeradius-mysql:amd64

答案1

我執行了以下操作:使用 gedit 編輯 /var/lib/dpkg/info/freeradius-mysql.postinst 文件

sudo gedit /var/lib/dpkg/info/freeradius-mysql.postinst

在腳本的幾乎最後一個部分,您會發現以下內容:

        if [ -x "`which invoke-rc.d 2>/dev/null`" ]; then
     invoke-rc.d freeradius force-reload
    else
      /etc/init.d/freeradius force-reload
    fi
;;

刪除指令“force-reload”和“restart”,如下所示:

        if [ -x "`which invoke-rc.d 2>/dev/null`" ]; then
     invoke-rc.d freeradius restart
    else
      /etc/init.d/freeradius restart
    fi
;;

然後做sudo dpkg --configure -a,然後完成

答案2

只需從以下位置取得包裹即可這裡並使用安裝它

dpkg -i freeradius-mysql.deb

然後重新啟動你的伺服器。

答案3

freeradius3的預設設定和init.d服務存在一些錯誤

  1. name=radiusd您必須將欄位中的欄位變更/etc/freeradius/radius.confname=freeradius
  2. 然後重啟服務
  3. 如果服務無法啟動,你必須查看日誌,也許問題出在allow_vulnerable_openssl = no,將其更改為yes,運行service freeradius restart
  4. 如果沒問題就運行 dpkg --configure -a

相關內容