我正在安装 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
;;
用“restart”删除命令“force-reload”,如下所示:
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
答案3
freeradius3 的默认配置和 init.d 服务存在一些 bug
- 您必须将字段更改
name=radiusd
为/etc/freeradius/radius.conf
name=freeradius
- 然后重启服务
- 如果服务无法启动,你必须查看日志,也许问题出在
allow_vulnerable_openssl = no
并将其更改为yes
,运行service freeradius restart
- 如果没问题,运行
dpkg --configure -a