Invoke-rc.d:无法通过运行sudo dpkg-reconfigure virtualbox-dkms来确定当前runlevel
我正在尝试在Ubuntu中执行 Vagrant UP 命令。在stackoverflow上的一些建议之后,我尝试运行其他命令来尝试解决这个问题,但是现在我卡住了,我不知道该怎么办。这就是我到目前为止所做的。
步骤1:
$ vagrant up
No usable default provider could be found for your system.
Vagrant relies on interactions with 3rd party systems, known as
"providers", to provide Vagrant with resources to run development
environments. Examples are VirtualBox, VMware, Hyper-V.
The easiest solution to this message is to install VirtualBox, which
is available for free on all major platforms.
If you believe you already have a provider available, make sure it
is properly installed and configured. You can see more details about
why a particular provider isn't working by forcing usage with
`vagrant up --provider=PROVIDER`, which should give you a more specific
error message for that particular provider.
步骤2:
$ vagrant up --provider virtualbox
The provider 'virtualbox' that was requested to back the machine
'ServerSHARK' is reporting that it isn't usable on this system. The
reason is shown below:
VirtualBox is complaining that the installation is incomplete. Please
run `VBoxManage --version` to see the error message which should contain
instructions on how to fix this error.
步骤3:
$ VBoxManage --version
WARNING: The character device /dev/vboxdrv does not exist.
Please install the virtualbox-dkms package and the appropriate
headers, most likely linux-headers-standard.
You will not be able to start VMs until this problem is fixed.
6.1.32_Ubuntur149290
步骤4:
$ sudo apt-get install virtualbox-dkms
Reading package lists... Done
Building dependency tree
Reading state information... Done
virtualbox-dkms is already the newest version (6.1.32-dfsg-1~ubuntu1.20.04.1).
virtualbox-dkms set to manually installed.
The following packages were automatically installed and are no longer required:
gyp javascript-common libauthen-sasl-perl libc-ares2 libdata-dump-perl
libencode-locale-perl libfile-basedir-perl libfile-desktopentry-perl
libfile-listing-perl libfile-mimeinfo-perl libfont-afm-perl libhtml-form-perl
libhtml-format-perl libhtml-parser-perl libhtml-tagset-perl libhtml-tree-perl
libhttp-cookies-perl libhttp-daemon-perl libhttp-date-perl libhttp-message-perl
libhttp-negotiate-perl libio-html-perl libio-socket-ssl-perl libio-stringy-perl
libipc-system-simple-perl libjs-inherits libjs-is-typedarray libjs-psl
libjs-typedarray-to-buffer liblwp-mediatypes-perl liblwp-protocol-https-perl
libmailtools-perl libnet-dbus-perl libnet-http-perl libnet-smtp-ssl-perl
libnet-ssleay-perl libtie-ixhash-perl libtimedate-perl libtry-tiny-perl
liburi-perl libuv1-dev libwww-perl libwww-robotrules-perl libx11-protocol-perl
libxml-parser-perl libxml-twig-perl libxml-xpathengine-perl node-abbrev
node-ajv node-ansi node-ansi-align node-ansi-regex node-ansi-styles
node-ansistyles node-aproba node-archy node-are-we-there-yet node-asap
node-asn1 node-assert-plus node-asynckit node-aws-sign2 node-aws4
node-balanced-match node-bcrypt-pbkdf node-bl node-bluebird node-boxen
node-brace-expansion node-builtin-modules node-builtins node-cacache
node-call-limit node-camelcase node-caseless node-chalk node-chownr
node-ci-info node-cli-boxes node-cliui node-clone node-co node-color-convert
node-color-name node-colors node-columnify node-combined-stream node-concat-map
node-concat-stream node-config-chain node-configstore
node-console-control-strings node-copy-concurrently node-core-util-is
node-cross-spawn node-crypto-random-string node-cyclist node-dashdash
node-debug node-decamelize node-decompress-response node-deep-extend
node-defaults node-define-properties node-delayed-stream node-delegates
node-detect-indent node-detect-newline node-dot-prop node-duplexer3
node-duplexify node-ecc-jsbn node-editor node-encoding node-end-of-stream
node-err-code node-errno node-es6-promise node-escape-string-regexp node-execa
node-extend node-extsprintf node-fast-deep-equal node-find-up
node-flush-write-stream node-forever-agent node-form-data node-from2
node-fs-vacuum node-fs-write-stream-atomic node-fs.realpath node-function-bind
node-gauge node-genfun node-get-caller-file node-get-stream node-getpass
node-glob node-got node-graceful-fs node-har-schema node-har-validator
node-has-flag node-has-symbol-support-x node-has-to-string-tag-x
node-has-unicode node-hosted-git-info node-http-signature node-iconv-lite
node-iferr node-import-lazy node-imurmurhash node-inflight node-inherits
node-ini node-invert-kv node-ip node-ip-regex node-is-npm node-is-obj
node-is-object node-is-path-inside node-is-plain-obj node-is-retry-allowed
node-is-stream node-is-typedarray node-isarray node-isexe node-isstream
node-isurl node-jsbn node-json-parse-better-errors node-json-schema
node-json-schema-traverse node-json-stable-stringify node-json-stringify-safe
node-jsonify node-jsonparse node-jsonstream node-jsprim node-latest-version
node-lazy-property node-lcid node-libnpx node-locate-path node-lockfile
node-lodash node-lodash-packages node-lowercase-keys node-lru-cache
node-make-dir node-mem node-mime node-mime-types node-mimic-fn
node-mimic-response node-minimatch node-minimist node-mississippi node-mkdirp
node-move-concurrently node-ms node-mute-stream node-nopt
node-normalize-package-data node-npm-bundled node-npm-package-arg
node-npm-run-path node-npmlog node-number-is-nan node-oauth-sign
node-object-assign node-once node-opener node-os-locale node-os-tmpdir
node-osenv node-p-cancelable node-p-finally node-p-is-promise node-p-limit
node-p-locate node-p-timeout node-package-json node-parallel-transform
node-path-exists node-path-is-absolute node-path-is-inside node-performance-now
node-pify node-prepend-http node-process-nextick-args node-promise-inflight
node-promise-retry node-promzard node-proto-list node-prr node-pseudomap
node-psl node-pump node-pumpify node-punycode node-qs node-qw node-rc node-read
node-read-package-json node-readable-stream node-registry-auth-token
node-registry-url node-request node-require-directory
node-require-main-filename node-resolve node-resolve-from node-retry
node-rimraf node-run-queue node-safe-buffer node-semver node-semver-diff
node-set-blocking node-sha node-shebang-command node-shebang-regex
node-signal-exit node-slash node-slide node-sorted-object node-spdx-correct
node-spdx-exceptions node-spdx-expression-parse node-spdx-license-ids
node-sshpk node-ssri node-stream-each node-stream-iterate node-stream-shift
node-strict-uri-encode node-string-decoder node-string-width node-strip-ansi
node-strip-eof node-strip-json-comments node-supports-color node-tar
node-term-size node-text-table node-through node-through2 node-timed-out
node-tough-cookie node-tunnel-agent node-tweetnacl node-typedarray
node-typedarray-to-buffer node-uid-number node-unique-filename
node-unique-string node-unpipe node-uri-js node-url-parse-lax
node-url-to-options node-util-deprecate node-uuid
node-validate-npm-package-license node-validate-npm-package-name node-verror
node-wcwidth.js node-which node-which-module node-wide-align node-widest-line
node-wrap-ansi node-wrappy node-write-file-atomic node-xdg-basedir node-xtend
node-y18n node-yallist node-yargs node-yargs-parser perl-openssl-defaults
x11-xserver-utils xdg-utils
Use 'sudo apt autoremove' to remove them.
0 upgraded, 0 newly installed, 0 to remove and 8 not upgraded.
步骤5:这是我卡住的地方。这些技巧似乎没有帮助。
$ sudo dpkg-reconfigure virtualbox-dkms
-------- Uninstall Beginning --------
Module: virtualbox
Version: 6.1.32
Kernel: 5.4.0-120-generic (x86_64)
-------------------------------------
Status: Before uninstall, this module version was ACTIVE on this kernel.
vboxdrv.ko:
- Uninstallation
- Deleting from: /lib/modules/5.4.0-120-generic/updates/dkms/
- Original module
- No original module was found for this module on this kernel.
- Use the dkms install command to reinstall any previous module version.
vboxnetadp.ko:
- Uninstallation
- Deleting from: /lib/modules/5.4.0-120-generic/updates/dkms/
- Original module
- No original module was found for this module on this kernel.
- Use the dkms install command to reinstall any previous module version.
vboxnetflt.ko:
- Uninstallation
- Deleting from: /lib/modules/5.4.0-120-generic/updates/dkms/
- Original module
- No original module was found for this module on this kernel.
- Use the dkms install command to reinstall any previous module version.
depmod...
DKMS: uninstall completed.
------------------------------
Deleting module version: 6.1.32
completely from the DKMS tree.
------------------------------
Done.
Loading new virtualbox-6.1.32 DKMS files...
It is likely that 5.10.16.3-microsoft-standard-WSL2 belongs to a chroot's host
Building for 5.4.0-120-generic
Building initial module for 5.4.0-120-generic
Done.
vboxdrv.ko:
Running module version sanity check.
- Original module
- No original module exists within this kernel
- Installation
- Installing to /lib/modules/5.4.0-120-generic/updates/dkms/
vboxnetadp.ko:
Running module version sanity check.
- Original module
- No original module exists within this kernel
- Installation
- Installing to /lib/modules/5.4.0-120-generic/updates/dkms/
vboxnetflt.ko:
Running module version sanity check.
- Original module
- No original module exists within this kernel
- Installation
- Installing to /lib/modules/5.4.0-120-generic/updates/dkms/
depmod...
DKMS: install completed.
invoke-rc.d: could not determine current runlevel
同样:
$ sudo dpkg-reconfigure virtualbox
invoke-rc.d: could not determine current runlevel
我是在监督什么吗?也许我没有看到正确的问题。 感谢您的帮助!
I am trying to execute the vagrant up command in Ubuntu. After some recommendations here on StackOverflow, I tried running other commands to try and solve this, but now I'm stuck and I don't know what I should do. This is what I have done until now.
Step 1:
$ vagrant up
No usable default provider could be found for your system.
Vagrant relies on interactions with 3rd party systems, known as
"providers", to provide Vagrant with resources to run development
environments. Examples are VirtualBox, VMware, Hyper-V.
The easiest solution to this message is to install VirtualBox, which
is available for free on all major platforms.
If you believe you already have a provider available, make sure it
is properly installed and configured. You can see more details about
why a particular provider isn't working by forcing usage with
`vagrant up --provider=PROVIDER`, which should give you a more specific
error message for that particular provider.
Step 2:
$ vagrant up --provider virtualbox
The provider 'virtualbox' that was requested to back the machine
'ServerSHARK' is reporting that it isn't usable on this system. The
reason is shown below:
VirtualBox is complaining that the installation is incomplete. Please
run `VBoxManage --version` to see the error message which should contain
instructions on how to fix this error.
Step 3:
$ VBoxManage --version
WARNING: The character device /dev/vboxdrv does not exist.
Please install the virtualbox-dkms package and the appropriate
headers, most likely linux-headers-standard.
You will not be able to start VMs until this problem is fixed.
6.1.32_Ubuntur149290
Step 4:
$ sudo apt-get install virtualbox-dkms
Reading package lists... Done
Building dependency tree
Reading state information... Done
virtualbox-dkms is already the newest version (6.1.32-dfsg-1~ubuntu1.20.04.1).
virtualbox-dkms set to manually installed.
The following packages were automatically installed and are no longer required:
gyp javascript-common libauthen-sasl-perl libc-ares2 libdata-dump-perl
libencode-locale-perl libfile-basedir-perl libfile-desktopentry-perl
libfile-listing-perl libfile-mimeinfo-perl libfont-afm-perl libhtml-form-perl
libhtml-format-perl libhtml-parser-perl libhtml-tagset-perl libhtml-tree-perl
libhttp-cookies-perl libhttp-daemon-perl libhttp-date-perl libhttp-message-perl
libhttp-negotiate-perl libio-html-perl libio-socket-ssl-perl libio-stringy-perl
libipc-system-simple-perl libjs-inherits libjs-is-typedarray libjs-psl
libjs-typedarray-to-buffer liblwp-mediatypes-perl liblwp-protocol-https-perl
libmailtools-perl libnet-dbus-perl libnet-http-perl libnet-smtp-ssl-perl
libnet-ssleay-perl libtie-ixhash-perl libtimedate-perl libtry-tiny-perl
liburi-perl libuv1-dev libwww-perl libwww-robotrules-perl libx11-protocol-perl
libxml-parser-perl libxml-twig-perl libxml-xpathengine-perl node-abbrev
node-ajv node-ansi node-ansi-align node-ansi-regex node-ansi-styles
node-ansistyles node-aproba node-archy node-are-we-there-yet node-asap
node-asn1 node-assert-plus node-asynckit node-aws-sign2 node-aws4
node-balanced-match node-bcrypt-pbkdf node-bl node-bluebird node-boxen
node-brace-expansion node-builtin-modules node-builtins node-cacache
node-call-limit node-camelcase node-caseless node-chalk node-chownr
node-ci-info node-cli-boxes node-cliui node-clone node-co node-color-convert
node-color-name node-colors node-columnify node-combined-stream node-concat-map
node-concat-stream node-config-chain node-configstore
node-console-control-strings node-copy-concurrently node-core-util-is
node-cross-spawn node-crypto-random-string node-cyclist node-dashdash
node-debug node-decamelize node-decompress-response node-deep-extend
node-defaults node-define-properties node-delayed-stream node-delegates
node-detect-indent node-detect-newline node-dot-prop node-duplexer3
node-duplexify node-ecc-jsbn node-editor node-encoding node-end-of-stream
node-err-code node-errno node-es6-promise node-escape-string-regexp node-execa
node-extend node-extsprintf node-fast-deep-equal node-find-up
node-flush-write-stream node-forever-agent node-form-data node-from2
node-fs-vacuum node-fs-write-stream-atomic node-fs.realpath node-function-bind
node-gauge node-genfun node-get-caller-file node-get-stream node-getpass
node-glob node-got node-graceful-fs node-har-schema node-har-validator
node-has-flag node-has-symbol-support-x node-has-to-string-tag-x
node-has-unicode node-hosted-git-info node-http-signature node-iconv-lite
node-iferr node-import-lazy node-imurmurhash node-inflight node-inherits
node-ini node-invert-kv node-ip node-ip-regex node-is-npm node-is-obj
node-is-object node-is-path-inside node-is-plain-obj node-is-retry-allowed
node-is-stream node-is-typedarray node-isarray node-isexe node-isstream
node-isurl node-jsbn node-json-parse-better-errors node-json-schema
node-json-schema-traverse node-json-stable-stringify node-json-stringify-safe
node-jsonify node-jsonparse node-jsonstream node-jsprim node-latest-version
node-lazy-property node-lcid node-libnpx node-locate-path node-lockfile
node-lodash node-lodash-packages node-lowercase-keys node-lru-cache
node-make-dir node-mem node-mime node-mime-types node-mimic-fn
node-mimic-response node-minimatch node-minimist node-mississippi node-mkdirp
node-move-concurrently node-ms node-mute-stream node-nopt
node-normalize-package-data node-npm-bundled node-npm-package-arg
node-npm-run-path node-npmlog node-number-is-nan node-oauth-sign
node-object-assign node-once node-opener node-os-locale node-os-tmpdir
node-osenv node-p-cancelable node-p-finally node-p-is-promise node-p-limit
node-p-locate node-p-timeout node-package-json node-parallel-transform
node-path-exists node-path-is-absolute node-path-is-inside node-performance-now
node-pify node-prepend-http node-process-nextick-args node-promise-inflight
node-promise-retry node-promzard node-proto-list node-prr node-pseudomap
node-psl node-pump node-pumpify node-punycode node-qs node-qw node-rc node-read
node-read-package-json node-readable-stream node-registry-auth-token
node-registry-url node-request node-require-directory
node-require-main-filename node-resolve node-resolve-from node-retry
node-rimraf node-run-queue node-safe-buffer node-semver node-semver-diff
node-set-blocking node-sha node-shebang-command node-shebang-regex
node-signal-exit node-slash node-slide node-sorted-object node-spdx-correct
node-spdx-exceptions node-spdx-expression-parse node-spdx-license-ids
node-sshpk node-ssri node-stream-each node-stream-iterate node-stream-shift
node-strict-uri-encode node-string-decoder node-string-width node-strip-ansi
node-strip-eof node-strip-json-comments node-supports-color node-tar
node-term-size node-text-table node-through node-through2 node-timed-out
node-tough-cookie node-tunnel-agent node-tweetnacl node-typedarray
node-typedarray-to-buffer node-uid-number node-unique-filename
node-unique-string node-unpipe node-uri-js node-url-parse-lax
node-url-to-options node-util-deprecate node-uuid
node-validate-npm-package-license node-validate-npm-package-name node-verror
node-wcwidth.js node-which node-which-module node-wide-align node-widest-line
node-wrap-ansi node-wrappy node-write-file-atomic node-xdg-basedir node-xtend
node-y18n node-yallist node-yargs node-yargs-parser perl-openssl-defaults
x11-xserver-utils xdg-utils
Use 'sudo apt autoremove' to remove them.
0 upgraded, 0 newly installed, 0 to remove and 8 not upgraded.
Step 5: This is where I got stuck. None of the tips seem to help.
$ sudo dpkg-reconfigure virtualbox-dkms
-------- Uninstall Beginning --------
Module: virtualbox
Version: 6.1.32
Kernel: 5.4.0-120-generic (x86_64)
-------------------------------------
Status: Before uninstall, this module version was ACTIVE on this kernel.
vboxdrv.ko:
- Uninstallation
- Deleting from: /lib/modules/5.4.0-120-generic/updates/dkms/
- Original module
- No original module was found for this module on this kernel.
- Use the dkms install command to reinstall any previous module version.
vboxnetadp.ko:
- Uninstallation
- Deleting from: /lib/modules/5.4.0-120-generic/updates/dkms/
- Original module
- No original module was found for this module on this kernel.
- Use the dkms install command to reinstall any previous module version.
vboxnetflt.ko:
- Uninstallation
- Deleting from: /lib/modules/5.4.0-120-generic/updates/dkms/
- Original module
- No original module was found for this module on this kernel.
- Use the dkms install command to reinstall any previous module version.
depmod...
DKMS: uninstall completed.
------------------------------
Deleting module version: 6.1.32
completely from the DKMS tree.
------------------------------
Done.
Loading new virtualbox-6.1.32 DKMS files...
It is likely that 5.10.16.3-microsoft-standard-WSL2 belongs to a chroot's host
Building for 5.4.0-120-generic
Building initial module for 5.4.0-120-generic
Done.
vboxdrv.ko:
Running module version sanity check.
- Original module
- No original module exists within this kernel
- Installation
- Installing to /lib/modules/5.4.0-120-generic/updates/dkms/
vboxnetadp.ko:
Running module version sanity check.
- Original module
- No original module exists within this kernel
- Installation
- Installing to /lib/modules/5.4.0-120-generic/updates/dkms/
vboxnetflt.ko:
Running module version sanity check.
- Original module
- No original module exists within this kernel
- Installation
- Installing to /lib/modules/5.4.0-120-generic/updates/dkms/
depmod...
DKMS: install completed.
invoke-rc.d: could not determine current runlevel
Same with this:
$ sudo dpkg-reconfigure virtualbox
invoke-rc.d: could not determine current runlevel
Am I overseeing something? Maybe I'm not seeing the right problem.
Thanks for your help!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论