我想试用一个名为gtsam的c++库的新主版本。由于我目前正在几个项目中使用一个旧版本的库,并且我不确定是否存在依赖问题,所以我决定使用checkinstall安装它:
mkdir build && cd build
make
sudo checkinstall由于它附带了我也想安装的python包装器,所以我安装了:
cd python
sudo checkinstall python setup.py install现在我想再次删除版本,所以我检查了在哪个包名下安装了库。
主库名为"build“,虽然我可以使用以下方法删除它,但我已经觉得很奇怪了:
sudo dkpg -r build当我现在尝试做同样的事情时:
sudo dpkg -r python它抱怨依赖问题,因为它将" python“解释为主要的ubuntu包。
如果我做了dpkg -l python,我得到:
Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
||/ Name Version Architecture Description
+++-=============================================-===========================-===========================-==================================================
ri python 20160629-1 amd64 Python part of gtsam-4.0.0-alpha1.在这一点上,我实际上有点害怕,不知道该怎么做,来解决这个问题。我想卸载由checkinstall python setup.py install安装的文件,而不破坏我的系统python设置的配置。
我实际上使用了查金斯特尔,因为我不想担心恢复安装.
发布于 2016-06-30 07:32:45
好吧,我想我解决了这个问题。
我发现使用apt-cache showpkg python,我可以查看所有可用的不同版本的python。我选择了最新的一个,并安装了它使用:
sudo apt-get install python=2.7.5-5ubuntu3它给了我一个警告,它不能删除一些“旧目录”:
dpkg: warning: unable to delete old directory '/usr/local/lib/python2.7/dist-packages': Directory not empty
dpkg: warning: unable to delete old directory '/usr/local/lib/python2.7': Directory not empty
dpkg: warning: unable to delete old directory '/usr/local/lib': Directory not empty
dpkg: warning: unable to delete old directory '/usr/local': Directory not empty但是这很好,因为我实际上试图在不删除这些目录的情况下解决问题。
现在,如果我做了一个dpkg -l python,我会得到以下正确的输出:
Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
||/ Name Version Architecture Description
+++-=============================================-===========================-===========================-====================================================================
ii python 2.7.5-5ubuntu3 amd64 interactive high-level object-oriented language (default version)我会监测我的系统是否有更多奇怪的行为,但目前看来这解决了这个问题。
https://askubuntu.com/questions/792756
复制相似问题