vbox安装,启动错误:Error: unable to find the sources of your current Linux kernel. Specify KERN_DIR= and run Make again. Stop.

[root@pohai share]# rpm -ivh VirtualBox-3.0.0_49315_fedora11-1.i586.rpm
Preparing           ########################################### [100%]
   1:VirtualBox             ########################################### [100%]

Creating group 'vboxusers'. VM users must be member of that group!

No precompiled module for this kernel found -- trying to build one. Messages
emitted during module compilation will be logged to /var/log/vbox-install.log.

Compilation of the kernel module FAILED! VirtualBox will not start until this
problem is fixed. Please consult /var/log/vbox-install.log to find out why the
kernel module does not compile. Most probably the kernel sources are not found.
Install them and execute

  /etc/init.d/vboxdrv setup

as root.

[root@pohai share]# /etc/init.d/vboxdrv setup
Stopping VirtualBox kernel module                          [  成功  ]
Recompiling VirtualBox kernel module                       [  失敗   ]
  (Look at /var/log/vbox-install.log to find out what went wrong)
[root@pohai share]# cat /var/log/vbox-install.log
Makefile:147: *** Error: unable to find the sources of your current Linux kernel. Specify KERN_DIR=<directory> and run Make again.  Stop.

 

 

[root@pohai share]# /etc/init.d/vboxdrv setup 启动vboxdrv 提示错误如上

 

处理方法:

先把套件調成這樣
[root@pohai share]# rpm -qa | grep kernel
kernel-devel-2.6.29.5-191.fc11.i586
kernel-firmware-2.6.29.5-191.fc11.noarch
kerneloops-0.12-5.fc11.i586
kernel-headers-2.6.29.5-191.fc11.i586
kernel-2.6.29.5-191.fc11.i586

結果在編譯一次vbox還是失敗
後來在看log發現他說找不到gcc指令
在用yum把gcc都裝上

終於可以看到成功的畫面
[root@pohai share]# /etc/init.d/vboxdrv setup    
Stopping VirtualBox kernel module                          [  確定  ]
Recompiling VirtualBox kernel module                       [  確定  ]
Starting VirtualBox kernel module                          [  確定  ]

 

 

 

 

  • 0
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
import sys from PyQt5.QtWidgets import QApplication, QWidget, QLabel, QPushButton, QVBoxLayout, QHBoxLayout from PyQt5.QtCore import Qt class QueueSystem(QWidget): def __init__(self): super().__init__() self.queue = [] # 存储队列信息 self.current_number = 0 # 当前的序号 self.initUI() def initUI(self): # 创建控件 self.label_title = QLabel('排队取号系统', self) self.label_number = QLabel('当前序号:{}'.format(self.current_number), self) self.label_queue = QLabel('等待人数:{}'.format(len(self.queue)), self) self.button_get_number = QPushButton('取号', self) self.button_reset = QPushButton('重置', self) # 设置控件样式 self.label_title.setAlignment(Qt.AlignCenter) self.label_title.setStyleSheet('font-size: 24px;') self.label_number.setStyleSheet('font-size: 18px;') self.label_queue.setStyleSheet('font-size: 18px;') self.button_get_number.setStyleSheet('font-size: 18px;') self.button_reset.setStyleSheet('font-size: 18px;') # 创建布局 vbox = QVBoxLayout() vbox.addWidget(self.label_title) vbox.addWidget(self.label_number) vbox.addWidget(self.label_queue) hbox = QHBoxLayout() hbox.addWidget(self.button_get_number) hbox.addWidget(self.button_reset) vbox.addLayout(hbox) self.setLayout(vbox) # 连接信号槽 self.button_get_number.clicked.connect(self.get_number) self.button_reset.clicked.connect(self.reset) # 设置窗口属性 self.setWindowTitle('排队取号系统') self.setGeometry(300, 300, 300, 200) self.show() def get_number(self): self.current_number += 1 self.queue.append(self.current_number) self.update_info() def reset(self): self.current_number = 0 self.queue = [] self.update_info() def update_info(self): self.label_number.setText('当前序号:{}'.format(self.current_number)) self.label_queue.setText('等待人数:{}'.format(len(self.queue))) def notify(self, number): if len(self.queue) > 0 and self.queue[0] == number: self.queue.pop(0) self.update_info() print('叫号:{}'.format(number)) if __name__ == '__main__': app = QApplication(sys.argv) queue_system = QueueSystem() sys.exit(app.exec_()) 优化该代码,使窗口最大化且不可以放大缩小,具备打印取号和记录当天取号记录功能
06-01

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值