小编Ahm*_*mad的帖子

如何安装 php5-mcrypt

当我尝试使用sudo apt-get install php5-mcrypt安装 php5-mcrypt 时,收到以下错误。我曾经sudo apt-get install lamp-server^安装过php5

ahmad@ubuntu:/var/www/html$ sudo apt-get install php5-mcrypt
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Package php5-mcrypt is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source

E: Package 'php5-mcrypt' has no installation candidate
Run Code Online (Sandbox Code Playgroud)

lamp php apt apache2

4
推荐指数
1
解决办法
3万
查看次数

如何编写将在 Ubuntu 20.04 中执行现有启动脚本的 init 脚本?

我的问题类似于:如何编写将执行现有启动脚本的初始化脚本?

但是,这个问题已经过时了,我想知道如何在 Ubuntu 20.04 中做到这一点

这是我在 init.d 目录中的尝试:

#! /bin/sh
### BEGIN INIT INFO
# Provides:          myrec
# Required-Start:    $all
# Required-Stop:
# Default-Start:     2 3 4 5
# Default-Stop:
# Short-Description: your description here
### END INIT INFO

PATH=/home/ahmad/recordings
DESC="Recording audio output"
NAME=myrec
DAEMON=/home/ahmad/recordings/myrec.sh
PIDFILE=/var/run/$NAME.pid
SCRIPTNAME=/etc/init.d/$NAME
Run Code Online (Sandbox Code Playgroud)
  • 我想在所有进程执行后运行它,所以我应该使用 systemd 服务还是上面的可以?

  • 我应该在上面添加其他代码还是运行我的 sh ( myrec.sh) 文件?

一般而言hello world,为 ubuntu 20.04 执行简单的 bash(以便我可以看到结果)是什么?我在网上找到的所有东西都过时了

init.d scripts services 20.04

3
推荐指数
1
解决办法
5981
查看次数

如何比较 Ubuntu 中两个文件的相等性?

我有两个大pkl文件。我对了解两个文件内容的比较不感兴趣(就像我们对带有diff,meld或 的文本文件所做的那样vimdiff)。我怀疑它们是一样的。它们的大小相等。但是,如果我想确定它们是否相同,是否有任何比较实用程序可以输出它们是否相同?

command-line diff

1
推荐指数
1
解决办法
195
查看次数

标签 统计

20.04 ×1

apache2 ×1

apt ×1

command-line ×1

diff ×1

init.d ×1

lamp ×1

php ×1

scripts ×1

services ×1