我正在尝试在 ubuntu 17.04 上安装 rails,但它给出了一个错误。然后我尝试运行其他安装,但错误是相同的。
E:dpkg 被中断,必须手动运行 'sudo dpkg --配置 -a' 来纠正问题。
当我尝试执行 sudo dpkg --configure -a 时,我遇到了以下输出:
Setting up python-crypto (2.6.1-7) ... Traceback (most recent call last): File "/usr/bin/pycompile", line 35, in from debpython.version import SUPPORTED, debsorted, vrepr, \ File "/usr/share/python/debpython/version.py", line 24, in from ConfigParser import SafeConfigParser ImportError: No module named 'ConfigParser' dpkg: error processing package python-crypto (--configure): subprocess installed post-installation script returned error exit status 1 Setting up python-sqlparse (0.2.2-1) ... Traceback (most recent call last): File "/usr/bin/pycompile", line 35, in from debpython.version import SUPPORTED, debsorted, vrepr, \ File "/usr/share/python/debpython/version.py", line 24, in from ConfigParser import SafeConfigParser ImportError: No module named 'ConfigParser' dpkg: error processing package python-sqlparse (--configure): subprocess installed post-installation script returned error exit status 1 Setting up python-wheel (0.29.0-2) ... Traceback (most recent call last): File "/usr/bin/pycompile", line 35, in from debpython.version import SUPPORTED, debsorted, vrepr, \ File "/usr/share/python/debpython/version.py", line 24, in from ConfigParser import SafeConfigParser ImportError: No module named 'ConfigParser' dpkg: error processing package python-wheel (--configure): subprocess installed post-installation script returned error exit status 1 Setting up python-tz (2014.10~dfsg1-0ubuntu2) ... Traceback (most recent call last): File "/usr/bin/pycompile", line 35, in from debpython.version import SUPPORTED, debsorted, vrepr, \ File "/usr/share/python/debpython/version.py", line 24, in from ConfigParser import SafeConfigParser ImportError: No module named 'ConfigParser' dpkg: error processing package python-tz (--configure): subprocess installed post-installation script returned error exit status 1 dpkg: dependency problems prevent configuration of python-keyrings.alt: python-keyrings.alt depends on python-crypto; however: Package python-crypto is not configured yet. dpkg: error processing package python-keyrings.alt (--configure): dependency problems - leaving unconfigured Setting up python-gi (3.22.0-2) ... Traceback (most recent call last): File "/usr/bin/pycompile", line 35, in from debpython.version import SUPPORTED, debsorted, vrepr, \ File "/usr/share/python/debpython/version.py", line 24, in from ConfigParser import SafeConfigParser ImportError: No module named 'ConfigParser' dpkg: error processing package python-gi (--configure): subprocess installed post-installation script returned error exit status 1 Setting up python-mysqldb (1.3.7-1.1) ... Traceback (most recent call last): File "/usr/bin/pycompile", line 35, in from debpython.version import SUPPORTED, debsorted, vrepr, \ File "/usr/share/python/debpython/version.py", line 24, in from ConfigParser import SafeConfigParser ImportError: No module named 'ConfigParser' dpkg: error processing package python-mysqldb (--configure): subprocess installed post-installation script returned error exit status 1 dpkg: error processing package apport (--configure): package is in a very bad inconsistent state; you should reinstall it before attempting configuration Setting up python-django (1.8.7-1ubuntu11) ... Traceback (most recent call last): File "/usr/bin/pycompile", line 35, in from debpython.version import SUPPORTED, debsorted, vrepr, \ File "/usr/share/python/debpython/version.py", line 24, in from ConfigParser import SafeConfigParser ImportError: No module named 'ConfigParser' dpkg: error processing package python-django (--configure): subprocess installed post-installation script returned error exit status 1 Setting up python-dbus (1.2.4-1) ... Remove stale byte-compiled files... Traceback (most recent call last): File "/usr/bin/pycompile", line 35, in from debpython.version import SUPPORTED, debsorted, vrepr, \ File "/usr/share/python/debpython/version.py", line 24, in from ConfigParser import SafeConfigParser ImportError: No module named 'ConfigParser' dpkg: error processing package python-dbus (--configure): subprocess installed post-installation script returned error exit status 1 Setting up python-pip (9.0.1-2) ... Traceback (most recent call last): File "/usr/bin/pycompile", line 35, in from debpython.version import SUPPORTED, debsorted, vrepr, \ File "/usr/share/python/debpython/version.py", line 24, in from ConfigParser import SafeConfigParser ImportError: No module named 'ConfigParser' dpkg: error processing package python-pip (--configure): subprocess installed post-installation script returned error exit status 1 Setting up python-xdg (0.25-4) ... Traceback (most recent call last): File "/usr/bin/pycompile", line 35, in from debpython.version import SUPPORTED, debsorted, vrepr, \ File "/usr/share/python/debpython/version.py", line 24, in from ConfigParser import SafeConfigParser ImportError: No module named 'ConfigParser' dpkg: error processing package python-xdg (--configure): subprocess installed post-installation script returned error exit status 1 dpkg: dependency problems prevent configuration of python-secretstorage: python-secretstorage depends on python-dbus; however: Package python-dbus is not configured yet. dpkg: error processing package python-secretstorage (--configure): dependency problems - leaving unconfigured dpkg: dependency problems prevent configuration of python-keyring: python-keyring depends on python-dbus; however: Package python-dbus is not configured yet. python-keyring depends on python-secretstorage; however: Package python-secretstorage is not configured yet. dpkg: error processing package python-keyring (--configure): dependency problems - leaving unconfigured Errors were encountered while processing: python-crypto python-sqlparse python-wheel python-tz python-keyrings.alt python-gi python-mysqldb apport python-django python-dbus python-pip python-xdg python-secretstorage python-keyring Tried following solution, [cd /var/lib/dpkg/updates sudo rm * sudo apt-get update][1]
从这里开始,但没有帮助我。我正在使用python3.5作为我的默认python。我已经使用别名更改了它。
这是由于将默认python版本从python2更改为python3后,字节编译器/usr/bin/pycompile
被破坏。
要解决这个问题,只需用以下命令将其替换为< code>/usr/bin/py3compile:
sudo mv /usr/bin/pycompile /usr/bin/py2compile
sudo ln -s /usr/bin/py3compile /usr/bin/pycompile
我这边一切都很好。
尝试更改python版本,对我来说它起作用了,您可以使用update-备选--config
在不使用别名的情况下在python版本之间切换。
确保删除了< code >/var/lib/dpkg/updates 下的所有内容
然后再次尝试该命令:
sudo dpkg --configure -a
下面是关于如何配置使用configure脚本的软件包的说明,适用于包中的'INSTALL'文件。 你可能要使用的普通文本的'INSTALL'与Autoconf一同发行。
我正在运行EMR笔记本中的所有代码。 火花版本 temp_df.print模式 温度df。显示(2) 温度df。写拼花地板(path='s3://project7878/clean\u data/temperatures.parquet',mode='overwrite',partitionBy='year') 火花阅读拼花地板(path='s3://project7878/clean\u dat
问题内容: 为什么Kotlin对此抱怨: 编译器抱怨在Line中由处理程序再次发布。这在纯Java中确实有效: 问题答案: Kotlin认为一个属性在其初始化程序结束之前尚未初始化,因此即使在lambda中也无法在其自己的初始化程序中使用该属性。这种语义类似于其初始化程序内部局部变量使用的限制。 有几种解决方法: 使用对象表达式可以引用已声明的对象: } 这仅适用于接口作为lambda的替代品,并
我在个人Ubuntu服务器机器中有以下PHP代码: 我从PHP得到这样的回答: 很明显,我想改变活跃的用户,但是有没有办法从php中做到这一点?
问题内容: 在我们的J2EE应用程序中,我们使用EJB-3有状态bean来允许前端代码创建,修改和保存持久性实体(通过JPA-2管理)。 看起来像这样: 非常重要的是,为了避免过早提交,只有方法位于事务内,因此,如果调用,则不会在数据库中插入任何内容。 奇怪的是,在方法中,我们必须调用才能真正访问数据库。实际上,我尝试过发现,我们也可以调用或,以及与“ em有关”的任何东西。 我不明白这一点。与事
我正在向现有endpoint添加一些代码来发送电子邮件。我们不需要发送电子邮件的结果来向用户返回响应,所以我在期货链的末尾添加了一个,从内部调用我们的电子邮件服务。对电子邮件服务的调用也是异步的,返回一个
第一次使用cron作业,我在linux上相对较新,我似乎无法让它工作,如果我只是在命令行中手动运行它,它工作得很好,但不是作为cron作业。 我是这样设置的: 合同-e 插入模式 */3****root(cd/home/ec2 user/;java-jar-feedPuller-1.jar)(每3分钟测试一次) 保存并退出 它说它已经创建了一个新的cron作业选项卡 现在,当我做crontab-l
我正在尝试为我的Android应用程序请求运行时权限。这是我的代码: 在我的AndroidManifest中。xml: 但是,上面的代码始终显示权限被拒绝,而不提示用户请求权限。有什么想法吗? 谢谢