Linux提示crontab command not found的解決方法
# 檢視定時任務列表 crontab -l
報錯提示:
- bash: crontab: command not found
# 安裝之前,先刪除 yum remove cronie # 安裝cronie yum -y install cronie
安裝依舊報錯:
Total download size: 92 k Installed size: 215 k Downloading packages:Delta RPMs disabled because /usr/bin/applydeltarpm not installed.cronie-1.4.11-23.el7.x86_64.rpm | 92 kB 00:00:00 Running transaction check Running transaction test Transaction test succeeded Running transaction Installing : cronie-1.4.11-23.el7.x86_64 1/1 Error unpacking rpm package cronie-1.4.11-23.el7.x86_64 error: unpacking of archive failed on file /etc/cron.d/0hourly;60a90564: cpio: open Verifying : cronie-1.4.11-23.el7.x86_64 1/1 Failed: cronie.x86_64 0:1.4.11-23.el7
報錯提示:
Delta RPMs disabled because /usr/bin/applydeltarpm not installed.
發現需要安裝deltarpm
yum -y install deltarpm
安裝deltarpm成功之後繼續安裝 yum -y install cronie
新的報錯提示:
Error unpacking rpm package cronie-1.4.11-23.el7.x86_64
error: unpacking of archive failed on file /etc/cron.d/0hourly;60a90661: cpio: open
解決方法【去除特殊屬性-i -a】:
[root@iZuf6bm7y86rsciyk4lvriZ ~]# find / -name "crontab"/var/lib/docker/overlay2/ef655c7ec12a300ff857c07225d0556025f494da1755aa038c88b86fbd876ccf/diff/usr/bin/crontab/etc/crontab[root@iZuf6bm7y86rsciyk4lvriZ ~]# lsattr /etc/crontab----ia-------e-- /etc/crontab[root@iZuf6bm7y86rsciyk4lvriZ ~]# chattr -i -a /etc/crontab[root@iZuf6bm7y86rsciyk4lvriZ ~]# lsattr /etc/crontab
去除特殊屬性
chattr -i -a /etc/crontab
然後重新安裝:yum -y install cronie
檢視Linux定時任務:
#檢視定時任務 crontab -l
原文地址: https://www.yundashi168.com/278.html
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/69988117/viewspace-2773517/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- bash: lspci: command not found解決方法
- 解決 command not found: expressExpress
- sqlplus: command not found解決SQL
- 解決bash: mysql: command not found的問題MySql
- Mac終端出現 brew command not found 解決Mac
- zabbix_get :command not found 解決辦法
- RHEL7 解決xclock的 bash: xclock: command not found…
- Linux:-bash: tree: command not foundLinux
- Linux:-bash: unzip: command not foundLinux
- 解決shell指令碼錯誤$’r’ command not found指令碼
- -bash: XXX: command not found解決辦法
- PHP-fpm Linux 環境使用 exec 函式呼叫 FFmpeg,報錯 FFmpeg: command not found 的解決方法PHPLinux函式
- CentOS 7 命令 lsb_release: command not found 解決方案CentOS
- 【Linux】git note -v command not foundLinuxGit
- 解決Vue中”This dependency was not found”的方法Vue
- “command-not-found has crashed” 解決辦法 (*unsolved)
- 【linux報錯】-bash: xhost: command not foundLinux
- symfony 2 No route found for “GET /” 的解決方法
- pip: command not found
- JAVA IPMI Command time out 解決方法Java
- mac mysql: command not foundMacMySql
- express: command not found.Express
- Linux yum提示Loaded plugins錯誤的解決方法LinuxPlugin
- Mac -bash: mysql: command not foundMacMySql
- -bash :gradlew command not foundGradle
- bash: hadoop: command not foundHadoop
- Mommy, I found it! — 15 Practical Linux Find Command ExamplesLinux
- 解決linux crontab備份mysql失敗的問題LinuxMySql
- AIX dtterm not found的解決AI
- Centos7 Minni 安裝 執行ifconfig命令出現 -bash ifconfig command not found 的解決方法CentOS
- 阿里雲伺服器Centos映象解決方案apt-get: command not found阿里伺服器CentOSapt-get
- 解決 biolinux-conda command not found 2018-05-04Linux
- MySQL提示Writing to net的解決方法MySql
- Nginx遇上AccessDenied提示解決方法Nginx
- aix_ssh scp command not foundAI
- sudo: apt-get: command not foundapt-get
- centos 7 -bash: mysql: command not foundCentOSMySql
- mysql中出現Unit mysql.service could not be found 的解決方法MySql