当前位置: 首页> 娱乐> 八卦 > 个人简历免费模板_郴州_制作网站的基本流程_网站seo怎么操作

个人简历免费模板_郴州_制作网站的基本流程_网站seo怎么操作

时间:2025/8/10 19:12:57来源:https://blog.csdn.net/xdhyqd/article/details/145679328 浏览次数:0次
个人简历免费模板_郴州_制作网站的基本流程_网站seo怎么操作

背景:使用ubuntu 22.04  默认python 未3.10.编译一些模块的时候发现需要降级到python3.9.于是下载安装

下载:

        

wget https://www.python.org/ftp/python/3.9.16/Python-3.9.16.tgz

解压与编译

tar -xf Python-3.9.16.tgz
cd Python-3.9.16
./configure --enable-optimizations --with-lto --enable-shared
make -j4 //这里根据自己的cpu core 自行更新需要的数字 

提示:

        在编译完成后,可能会遇到一些缺少库的提示,尽量安装完成,参考如下

Python build finished successfully!
The necessary bits to build these optional modules were not found:
_dbm                  _tkinter                            
To find the necessary bits, look in setup.py in detect_modules() for the module's name.

可以使用相关的一些指令去安装,例如

sudo apt-get install xxx (或者libxxx-dev)  //xxx 未上面报的缺少的内容

安装:

        

sudo make altinstall

 安装后遇到的问题

   1.error while loading shared libraries: libpython3.9.so.1.0: cannot open shared object file: No such file or directory

问题根因

         系统默认加载/usr/lib,/lib下面库文件,python3.9 默认安装到非此类文件夹,所以查找不到相关的lib

解决方案

        1,cp /usr/local/lib/libpython3.9.so.1.0 /usr/lib64

                ldconfig

        2,cp /usr/local/lib/libpython3.9.so.1.0 /usr/lib

             echo "/usr/lib" > /etc/ld.so.conf.d/python3.9.conf

                ldconfig

重点:以上修改原理都一样,根据个人爱好。我 用的第一个。一定要运行ldconfig,这个很重要。

2. terminal 或者终端打不开

        问题根因:

               使用原生的xterm ,运行命令:gnome-terminal.报错如下:

        

指定默认python版本

由于系统中有多个python 版本,需要指定使用哪个,网上有各种各样的版本,我建议使用正规方式,使用update-alternatives的方式

        1,确认都有系统哪些python版本 

        可以通过ls /usr/bin/python* 等方式来确认

2,使用update-alternatives来修改

*************************:~$  update-alternatives --help
Usage: update-alternatives [<option> ...] <command>Commands:--install <link> <name> <path> <priority>[--slave <link> <name> <path>] ...add a group of alternatives to the system.--remove <name> <path>   remove <path> from the <name> group alternative.--remove-all <name>      remove <name> group from the alternatives system.--auto <name>            switch the master link <name> to automatic mode.--display <name>         display information about the <name> group.--query <name>           machine parseable version of --display <name>.--list <name>            display all targets of the <name> group.--get-selections         list master alternative names and their status.--set-selections         read alternative status from standard input.--config <name>          show alternatives for the <name> group and ask theuser to select which one to use.--set <name> <path>      set <path> as alternative for <name>.--all                    call --config on all alternatives.<link> is the symlink pointing to /etc/alternatives/<name>.(e.g. /usr/bin/pager)
<name> is the master name for this link group.(e.g. pager)
<path> is the location of one of the alternative target files.(e.g. /usr/bin/less)
<priority> is an integer; options with higher numbers have higher priority inautomatic mode.Options:--altdir <directory>     change the alternatives directory(default is /etc/alternatives).--admindir <directory>   change the administrative directory(default is /var/lib/dpkg/alternatives).--instdir <directory>    change the installation directory.--root <directory>       change the filesystem root directory.--log <file>             change the log file.--force                  allow replacing files with alternative links.--skip-auto              skip prompt for alternatives correctly configuredin automatic mode (relevant for --config only)--quiet                  quiet operation, minimal output.--verbose                verbose operation, more output.--debug                  debug output, way more output.--help                   show this help message.--version                show the version.

显示配置

update-alternatives --display python3

 若果没有,就按照规则添加

sudo update-alternatives --install /usr/bin/python3 python3 /usr/local/bin/python3.9 2
sudo update-alternatives --install /usr/bin/python3 python3 /usr//bin/python3.10 1

后面的数字越大,优先级越高

选择默认python 配置

sudo  update-alternatives --config  python3

根据提示,输入需要python版本前面的数字

持续更新中。。。

关键字:个人简历免费模板_郴州_制作网站的基本流程_网站seo怎么操作

版权声明:

本网仅为发布的内容提供存储空间,不对发表、转载的内容提供任何形式的保证。凡本网注明“来源:XXX网络”的作品,均转载自其它媒体,著作权归作者所有,商业转载请联系作者获得授权,非商业转载请注明出处。

我们尊重并感谢每一位作者,均已注明文章来源和作者。如因作品内容、版权或其它问题,请及时与我们联系,联系邮箱:809451989@qq.com,投稿邮箱:809451989@qq.com

责任编辑: