卸载apt-get 安装的PostgreSQL版本

文章目录

  • 卸载apt-get 安装的PostgreSQL版本
    • 查找已安装的PostgreSQL包
    • 卸载PostgreSQL:
    • 检查并删除残留文件
    • 验证卸载

卸载apt-get 安装的PostgreSQL版本

卸载通过apt-get安装的PostgreSQL 就版本,可以按照以下步骤进行。

查找已安装的PostgreSQL包

在卸载之前,建议先查找并确认已安装的PostgreSQL包及其版本。
可以使用以下命令来查找与PostgreSQL相关的所有已安装包:

dpkg -l | grep postgresql

例:

root@autodl-container-616f40a3b3-41cb82d9:~# dpkg -l | grep postgresql
ii  postgresql                    10+190ubuntu0.1     all                 object-relational SQL database (supported version)
ii  postgresql-10                 10.23-0ubuntu0.18.0 amd64               object-relational SQL database, version 10 server
ii  postgresql-client             10+190ubuntu0.1     all                 front-end programs for PostgreSQL (supported version)
ii  postgresql-client-10          10.23-0ubuntu0.18.0 amd64               front-end programs for PostgreSQL 10
ii  postgresql-client-common      190ubuntu0.1        all                 manager for multiple PostgreSQL client versions
ii  postgresql-common             190ubuntu0.1        all                 PostgreSQL database-cluster manager
ii  postgresql-server-dev-10      10.23-0ubuntu0.18.0 amd64               development files for PostgreSQL 10 server-side programming
ii  postgresql-server-dev-all     190ubuntu0.1        all                 extension build tool for multiple PostgreSQL versions

卸载PostgreSQL:

使用apt-get的–purge remove选项来卸载PostgreSQL及其配置文件。
通常apt-get卸载时不需要指定小版本号,因为它会卸载所有相关的PostgreSQL包。
不过,如果出于某种原因你需要更精确地指定版本,可能需要查找确切的包名(这通常包括版本号)。但大多数情况下,以下命令就足够了:

sudo apt-get --purge remove postgresql*

这个命令会卸载所有以“postgresql”开头的包,包括PostgreSQL服务器、客户端库、文档等。–purge选项会同时删除配置文件。

例:

root@autodl-container-616f40a3b3-41cb82d9:/usr/lib/postgresql# cd ~
root@autodl-container-616f40a3b3-41cb82d9:~# apt-get --purge remove postgresql*
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Note, selecting 'postgresql-10-pgrouting' for glob 'postgresql*'
Note, selecting 'postgresql-common' for glob 'postgresql*'
Note, selecting 'postgresql-10-pgrouting-doc' for glob 'postgresql*'
Note, selecting 'postgresql-10-repmgr' for glob 'postgresql*'
Note, selecting 'postgresql-9.2-repmgr' for glob 'postgresql*'
Note, selecting 'postgresql-10-dirtyread' for glob 'postgresql*'
Note, selecting 'postgresql-pltcl' for glob 'postgresql*'
Note, selecting 'postgresql-10-asn1oid' for glob 'postgresql*'
Note, selecting 'postgresql-contrib-10' for glob 'postgresql*'
Note, selecting 'postgresql-server-dev-all' for glob 'postgresql*'
Note, selecting 'postgresql-plv8' for glob 'postgresql*'
Note, selecting 'postgresql-10-postgis-2.2-scripts' for glob 'postgresql*'
Note, selecting 'postgresql-10-unit' for glob 'postgresql*'
Note, selecting 'postgresql-10-pgfincore' for glob 'postgresql*'
Note, selecting 'postgresql-10-prioritize' for glob 'postgresql*'
Note, selecting 'postgresql-10-postgis-scripts' for glob 'postgresql*'
Note, selecting 'postgresql-10-pldebugger' for glob 'postgresql*'
Note, selecting 'postgresql-10-mimeo' for glob 'postgresql*'
Note, selecting 'postgresql-9.5-repmgr' for glob 'postgresql*'
Note, selecting 'postgresql-10-python3-multicorn' for glob 'postgresql*'
Note, selecting 'postgresql-10-bgw-replstatus' for glob 'postgresql*'
Note, selecting 'postgresql-10-postgis-2.4' for glob 'postgresql*'
Note, selecting 'postgresql-10-amcheck' for glob 'postgresql*'
Note, selecting 'postgresql-10-jsquery' for glob 'postgresql*'
Note, selecting 'postgresql-filedump' for glob 'postgresql*'
Note, selecting 'postgresql-10-pgmemcache' for glob 'postgresql*'
Note, selecting 'postgresql-10-postgis-2.4-scripts' for glob 'postgresql*'
Note, selecting 'postgresql-10-ogr-fdw' for glob 'postgresql*'
Note, selecting 'postgresql-10-pglogical' for glob 'postgresql*'
Note, selecting 'postgresql-10-postgis-2.3-scripts' for glob 'postgresql*'
Note, selecting 'postgresql-python3-multicorn' for glob 'postgresql*'
Note, selecting 'postgresql-postgis-java' for glob 'postgresql*'
Note, selecting 'postgresql-10-pgrouting-scripts' for glob 'postgresql*'
Note, selecting 'postgresql-10-pgsphere' for glob 'postgresql*'
Note, selecting 'postgresql-10-pgtap' for glob 'postgresql*'
Note, selecting 'postgresql-doc-10' for glob 'postgresql*'
Note, selecting 'postgresql-python-multicorn' for glob 'postgresql*'
Note, selecting 'postgresql-10-cron' for glob 'postgresql*'
Note, selecting 'postgresql-all' for glob 'postgresql*'
Note, selecting 'postgresql-10-pgmp' for glob 'postgresql*'
Note, selecting 'postgresql-9.3-repmgr' for glob 'postgresql*'
Note, selecting 'postgresql-10-pgq3' for glob 'postgresql*'
Note, selecting 'postgresql-10-plproxy' for glob 'postgresql*'
Note, selecting 'postgresql-7.4' for glob 'postgresql*'
Note, selecting 'postgresql-9.0-repmgr' for glob 'postgresql*'
Note, selecting 'postgresql-doc' for glob 'postgresql*'
Note, selecting 'postgresql-8.0' for glob 'postgresql*'
Note, selecting 'postgresql-10-debversion' for glob 'postgresql*'
Note, selecting 'postgresql-10' for glob 'postgresql*'
Note, selecting 'postgresql-10-q3c' for glob 'postgresql*'
Note, selecting 'postgresql-10-prefix' for glob 'postgresql*'
Note, selecting 'postgresql-10-slony1-2' for glob 'postgresql*'
Note, selecting 'postgresql-pgtap' for glob 'postgresql*'
Note, selecting 'postgresql-9.1' for glob 'postgresql*'
Note, selecting 'postgresql-9.3' for glob 'postgresql*'
Note, selecting 'postgresql-9.4' for glob 'postgresql*'
Note, selecting 'postgresql-9.5' for glob 'postgresql*'
Note, selecting 'postgresql-9.6' for glob 'postgresql*'
Note, selecting 'postgresql-10-plr' for glob 'postgresql*'
Note, selecting 'postgresql-client' for glob 'postgresql*'
Note, selecting 'postgresql-10-citus' for glob 'postgresql*'
Note, selecting 'postgresql-10-pgextwlist' for glob 'postgresql*'
Note, selecting 'postgresql-10-plsh' for glob 'postgresql*'
Note, selecting 'postgresql-10-plv8' for glob 'postgresql*'
Note, selecting 'postgresql-10-pgaudit' for glob 'postgresql*'
Note, selecting 'postgresql-plperl' for glob 'postgresql*'
Note, selecting 'postgresql-10-mysql-fdw' for glob 'postgresql*'
Note, selecting 'postgresql-9.6-repmgr' for glob 'postgresql*'
Note, selecting 'postgresql-10-rum' for glob 'postgresql*'
Note, selecting 'postgresql-hll' for glob 'postgresql*'
Note, selecting 'postgresql' for glob 'postgresql*'
Note, selecting 'postgresql-10-ip4r' for glob 'postgresql*'
Note, selecting 'postgresql-10-powa' for glob 'postgresql*'
Note, selecting 'postgresql-contrib' for glob 'postgresql*'
Note, selecting 'postgresql-10-slony1' for glob 'postgresql*'
Note, selecting 'postgresql-plpython3' for glob 'postgresql*'
Note, selecting 'postgresql-10-pgq-node' for glob 'postgresql*'
Note, selecting 'postgresql-server' for glob 'postgresql*'
Note, selecting 'postgresql-q3c' for glob 'postgresql*'
Note, selecting 'postgresql-plpython' for glob 'postgresql*'
Note, selecting 'postgresql-plr' for glob 'postgresql*'
Note, selecting 'postgresql-10-partman' for glob 'postgresql*'
Note, selecting 'postgresql-autodoc' for glob 'postgresql*'
Note, selecting 'postgresql-10-orafce' for glob 'postgresql*'
Note, selecting 'postgresql-10-pllua' for glob 'postgresql*'
Note, selecting 'postgresql-pltcl-10' for glob 'postgresql*'
Note, selecting 'postgresql-10-repack' for glob 'postgresql*'
Note, selecting 'postgresql-10-preprepare' for glob 'postgresql*'
Note, selecting 'postgresql-comparator' for glob 'postgresql*'
Note, selecting 'postgresql-9.4-repmgr' for glob 'postgresql*'
Note, selecting 'postgresql-pgsphere' for glob 'postgresql*'
Note, selecting 'postgresql-server-dev-10' for glob 'postgresql*'
Note, selecting 'postgresql-plperl-10' for glob 'postgresql*'
Note, selecting 'postgresql-9.1-repmgr' for glob 'postgresql*'
Note, selecting 'postgresql-10-similarity' for glob 'postgresql*'
Note, selecting 'postgresql-client-10' for glob 'postgresql*'
Note, selecting 'postgresql-plpython-10' for glob 'postgresql*'
Note, selecting 'postgresql-plpython3-10' for glob 'postgresql*'
Note, selecting 'postgresql-client-common' for glob 'postgresql*'
Note, selecting 'postgresql-10-python-multicorn' for glob 'postgresql*'
Note, selecting 'postgresql-10' instead of 'postgresql-contrib-10'
Package 'postgresql-7.4' is not installed, so not removed
Package 'postgresql-8.0' is not installed, so not removed
Package 'postgresql-9.1' is not installed, so not removed
Note, selecting 'postgresql-plperl-10' instead of 'postgresql-plperl'
Note, selecting 'postgresql-plpython-10' instead of 'postgresql-plpython'
Note, selecting 'postgresql-plpython3-10' instead of 'postgresql-plpython3'
Note, selecting 'postgresql-pltcl-10' instead of 'postgresql-pltcl'
Package 'postgresql-9.3' is not installed, so not removed
Package 'postgresql-9.4' is not installed, so not removed
Package 'postgresql-9.5' is not installed, so not removed
Package 'postgresql-9.6' is not installed, so not removed
Note, selecting 'postgresql-10-plr' instead of 'postgresql-plr'
Package 'postgresql-server' is not installed, so not removed
Package 'postgresql-postgis-java' is not installed, so not removed
Note, selecting 'postgresql-10-pgtap' instead of 'postgresql-pgtap'
Note, selecting 'postgresql-10-plv8' instead of 'postgresql-plv8'
Package 'postgresql-10-postgis-2.2-scripts' is not installed, so not removed
Package 'postgresql-10-postgis-2.3-scripts' is not installed, so not removed
Note, selecting 'postgresql-10-python-multicorn' instead of 'postgresql-python-multicorn'
Note, selecting 'postgresql-10-python3-multicorn' instead of 'postgresql-python3-multicorn'
Note, selecting 'postgresql-10-slony1-2' instead of 'postgresql-10-slony1'
Note, selecting 'postgresql-pgsphere' instead of 'postgresql-10-pgsphere'
Note, selecting 'postgresql-q3c' instead of 'postgresql-10-q3c'
Package 'postgresql-9.6-repmgr' is not installed, so not removed
Package 'postgresql-9.5-repmgr' is not installed, so not removed
Package 'postgresql-9.4-repmgr' is not installed, so not removed
Package 'postgresql-9.3-repmgr' is not installed, so not removed
Package 'postgresql-9.2-repmgr' is not installed, so not removed
Package 'postgresql-9.1-repmgr' is not installed, so not removed
Package 'postgresql-9.0-repmgr' is not installed, so not removed
Package 'postgresql-10-amcheck' is not installed, so not removed
Package 'postgresql-10-asn1oid' is not installed, so not removed
Package 'postgresql-10-bgw-replstatus' is not installed, so not removed
Package 'postgresql-10-citus' is not installed, so not removed
Package 'postgresql-10-cron' is not installed, so not removed
Package 'postgresql-10-debversion' is not installed, so not removed
Package 'postgresql-10-dirtyread' is not installed, so not removed
Package 'postgresql-10-ip4r' is not installed, so not removed
Package 'postgresql-10-jsquery' is not installed, so not removed
Package 'postgresql-10-mimeo' is not installed, so not removed
Package 'postgresql-10-mysql-fdw' is not installed, so not removed
Package 'postgresql-10-ogr-fdw' is not installed, so not removed
Package 'postgresql-10-orafce' is not installed, so not removed
Package 'postgresql-10-partman' is not installed, so not removed
Package 'postgresql-10-pgaudit' is not installed, so not removed
Package 'postgresql-10-pgextwlist' is not installed, so not removed
Package 'postgresql-10-pgfincore' is not installed, so not removed
Package 'postgresql-10-pglogical' is not installed, so not removed
Package 'postgresql-10-pgmemcache' is not installed, so not removed
Package 'postgresql-10-pgmp' is not installed, so not removed
Package 'postgresql-10-pgrouting' is not installed, so not removed
Package 'postgresql-10-pgrouting-doc' is not installed, so not removed
Package 'postgresql-10-pgrouting-scripts' is not installed, so not removed
Package 'postgresql-10-pgtap' is not installed, so not removed
Package 'postgresql-10-pldebugger' is not installed, so not removed
Package 'postgresql-10-pllua' is not installed, so not removed
Package 'postgresql-10-plproxy' is not installed, so not removed
Package 'postgresql-10-plr' is not installed, so not removed
Package 'postgresql-10-plsh' is not installed, so not removed
Package 'postgresql-10-plv8' is not installed, so not removed
Package 'postgresql-10-postgis-2.4' is not installed, so not removed
Package 'postgresql-10-postgis-2.4-scripts' is not installed, so not removed
Package 'postgresql-10-postgis-scripts' is not installed, so not removed
Package 'postgresql-10-powa' is not installed, so not removed
Package 'postgresql-10-prefix' is not installed, so not removed
Package 'postgresql-10-preprepare' is not installed, so not removed
Package 'postgresql-10-prioritize' is not installed, so not removed
Package 'postgresql-10-python-multicorn' is not installed, so not removed
Package 'postgresql-10-python3-multicorn' is not installed, so not removed
Package 'postgresql-10-repack' is not installed, so not removed
Package 'postgresql-10-repmgr' is not installed, so not removed
Package 'postgresql-10-rum' is not installed, so not removed
Package 'postgresql-10-similarity' is not installed, so not removed
Package 'postgresql-10-slony1-2' is not installed, so not removed
Package 'postgresql-10-unit' is not installed, so not removed
Package 'postgresql-autodoc' is not installed, so not removed
Package 'postgresql-comparator' is not installed, so not removed
Package 'postgresql-filedump' is not installed, so not removed
Package 'postgresql-hll' is not installed, so not removed
Package 'postgresql-pgsphere' is not installed, so not removed
Package 'postgresql-q3c' is not installed, so not removed
Package 'postgresql-contrib' is not installed, so not removed
Package 'postgresql-doc' is not installed, so not removed
Package 'postgresql-doc-10' is not installed, so not removed
Package 'postgresql-plperl-10' is not installed, so not removed
Package 'postgresql-plpython-10' is not installed, so not removed
Package 'postgresql-plpython3-10' is not installed, so not removed
Package 'postgresql-pltcl-10' is not installed, so not removed
Package 'postgresql-10-pgq-node' is not installed, so not removed
Package 'postgresql-10-pgq3' is not installed, so not removed
Package 'postgresql-all' is not installed, so not removed
The following packages were automatically installed and are no longer required:cron dctrl-tools distro-info-data iproute2 libatm1 libmnl0 libpq-dev libxslt1.1 libxtables12 logrotate lsb-release ssl-cert sysstat
Use 'apt autoremove' to remove them.
The following packages will be REMOVED:postgresql* postgresql-10* postgresql-client* postgresql-client-10* postgresql-client-common* postgresql-common*postgresql-server-dev-10* postgresql-server-dev-all*
0 upgraded, 0 newly installed, 8 to remove and 169 not upgraded.
After this operation, 26.5 MB disk space will be freed.
Do you want to continue? [Y/n] Y
(Reading database ... 45376 files and directories currently installed.)
Removing postgresql (10+190ubuntu0.1) ...
Removing postgresql-10 (10.23-0ubuntu0.18.04.2) ...
invoke-rc.d: could not determine current runlevel
invoke-rc.d: policy-rc.d denied execution of stop.
Removing postgresql-client (10+190ubuntu0.1) ...
Removing postgresql-client-10 (10.23-0ubuntu0.18.04.2) ...
Removing postgresql-server-dev-all (190ubuntu0.1) ...
Removing postgresql-server-dev-10 (10.23-0ubuntu0.18.04.2) ...
Removing postgresql-common (190ubuntu0.1) ...
invoke-rc.d: could not determine current runlevel
invoke-rc.d: policy-rc.d denied execution of stop.
Removing 'diversion of /usr/bin/pg_config to /usr/bin/pg_config.libpq-dev by postgresql-common'
Removing postgresql-client-common (190ubuntu0.1) ...
(Reading database ... 43895 files and directories currently installed.)
Purging configuration files for postgresql-10 (10.23-0ubuntu0.18.04.2) ...
Dropping cluster main...
Purging configuration files for postgresql-client-common (190ubuntu0.1) ...
dpkg: warning: while removing postgresql-client-common, directory '/etc/postgresql-common' not empty so not removed
Purging configuration files for postgresql-common (190ubuntu0.1) ...
dpkg: warning: while removing postgresql-common, directory '/var/lib/postgresql' not empty so not removed
root@autodl-container-616f40a3b3-41cb82d9:~# 

检查并删除残留文件

卸载后,你可能还想检查并手动删除PostgreSQL可能留下的任何残留文件或目录。
这通常包括/etc/postgresql/(配置文件)和/var/lib/postgresql/(数据文件)目录。

例:

root@autodl-container-616f40a3b3-41cb82d9:~# ls -l /etc/postgresql-common
ls: cannot access '/etc/postgresql-common': No such file or directory
root@autodl-container-616f40a3b3-41cb82d9:~# ls -l /var/lib/postgresql
total 31864
-rw------- 1 postgres postgres     2812 Sep 28 08:56 logfile
drwxrwxr-x 7 postgres postgres      111 Sep 26 22:16 pgsql16
drwxrwxr-x 7 postgres postgres     4096 Sep 27 21:46 pgvector
drwxrwxr-x 6 postgres postgres     4096 Sep 26 21:30 postgresql-16.3
-rw-rw-r-- 1 postgres postgres 32616059 May  7 04:31 postgresql-16.3.tar.gz
root@autodl-container-616f40a3b3-41cb82d9:~# 

但是,由于–purge选项已经尝试删除了配置文件,这些目录可能已经被清空或不存在了。

验证卸载

可以使用dpkg -l | grep postgresql命令再次检查,以确保没有留下任何与PostgreSQL相关的包。
如果命令没有返回任何内容,说明PostgreSQL已经被成功卸载。

root@autodl-container-616f40a3b3-41cb82d9:~# dpkg -l | grep postgresql
root@autodl-container-616f40a3b3-41cb82d9:~# 

按照上述步骤操作后,你应该已经成功卸载了通过apt-get安装的PostgreSQL 10.23版本。

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.mzph.cn/diannao/55416.shtml

如若内容造成侵权/违法违规/事实不符,请联系多彩编程网进行投诉反馈email:809451989@qq.com,一经查实,立即删除!

相关文章

信号处理快速傅里叶变换(FFT)的学习

FFT是离散傅立叶变换的快速算法,可以将一个信号变换到频域。有些信号在时域上是很难看出什么特征的,但是如果变换到频域之后,就很容易看出特征了。这就是很多信号分析采用FFT变换的原因。另外,FFT可以将一个信号的频谱提取出来&am…

StarRocks 中如何做到查询超时(QueryTimeout)

背景 本文基于 StarRocks 3.1.7 主要是分析以下两种超时设置的方式: SESSION 级别 SET query_timeout 10;SELECT sleep(20);SQL 级别 select /* SET_VAR(query_timeout10) */ sleep(20); 通过本文的分析大致可以了解到在Starrocks的FE端是如何进行Command的交互以及数据流走…

Java Web 之 Cookie 详解

在 JavaWeb 开发中,Cookie 就像网站给浏览器贴的小纸条,用于记录一些用户信息或状态,方便下次访问时识别用户身份或进行个性化服务。 也可以这么理解: 场景一:想象一下,你去一家咖啡店,店员认…

webpack信息泄露

先看看webpack中文网给出的解释 webpack 是一个模块打包器。它的主要目标是将 JavaScript 文件打包在一起,打包后的文件用于在浏览器中使用,但它也能够胜任转换、打包或包裹任何资源。 如果未正确配置,会生成一个.map文件,它包含了原始JavaScript代码的映…

VPN简述

文章目录 VPNVPN基础VPN类型 VPN VPN隧道安全 VPN基础 背景: 在网络传输中,绝大部分数据内容都是明文传输,存在很多安全隐患(窃听、篡改、冒充) 总部、分公司、办事处、出差人员、合作单位等需要访问总部网络资源 Vi…

富格林:警悟可信经验安全投资

富格林指出,黄金具有不错的投资价值,一直以来备受投资者的喜爱,近年来大家也纷纷加入现货黄金市场为己增值财富。但是要为投资安全护航的前提,是需要投资者使用合适可信的方法以及掌握相对应的投资技巧。下面富格林将总结以下可信…

【数学分析笔记】第4章第4节 复合函数求导法则及其应用(1)

4. 微分 4.4 复合函数求导法则及其应用 4.4.1 复合函数求导法则 【定理4.4.1】 u g ( x ) ug(x) ug(x)在 x x 0 xx_0 xx0​可导, g ( x 0 ) u ( 0 ) g(x_0)u(0) g(x0​)u(0), y f ( u ) yf(u) yf(u)在 u u 0 uu_0 uu0​可导,则 y f …

SpringBoot+Redis+RabbitMQ完成增删改查

各部分分工职责 RabbitMQ负责添加、修改、删除的异步操作 Redis负责数据的缓存 RabbitMQ里面角色职责简单描述 RabbitMQ里面有几个角色要先分清以及他们的对应关系: 交换机、队列、路由键 交换机和队列是一对多 队列和路由键是多对多 然后就是消息的发送者&…

课设实验-数据结构-线性表-手机销售

题目&#xff1a; 代码&#xff1a; #include<stdio.h> #include<string.h> #define MaxSize 10 //定义顺序表最大长度 //定义手机结构体类型 typedef struct {char PMod[10];//手机型号int PPri;//价格int PNum;//库存量 }PhoType; //手机类型 //记录手机的顺序…

【HTTP(3)】(状态码,https)

【认识状态码】 状态码最重要的目的&#xff0c;就是反馈给浏览器:这次请求是否成功&#xff0c;若失败&#xff0c;则出现失败原因 常见状态码: 200:OK&#xff0c;表示成功 404:Not Found&#xff0c;浏览器访问的资源在服务器上没有找到 403:Forbidden&#xff0c;访问被…

springboot系列--web相关知识探索三

一、前言 web相关知识探索二中研究了请求是如何映射到具体接口&#xff08;方法&#xff09;中的&#xff0c;本次文章主要研究请求中所带的参数是如何映射到接口参数中的&#xff0c;也即请求参数如何与接口参数绑定。主要有四种、分别是注解方式、Servlet API方式、复杂参数、…

【案例】距离限制模型透明

开发平台&#xff1a;Unity 2023 开发工具&#xff1a;Unity ShaderGraph   一、效果展示 二、路线图 三、案例分析 核心思路&#xff1a;计算算式&#xff1a;透明值 实际距离 / 最大距离 &#xff08;实际距离 ≤ 最大距离&#xff09;   3.1 说明 | 改变 Alpha 值 在 …

计算机组成原理之无符号整数的表示和运算

无符号整数的表示 无符号整数的表示&#xff1a;无符号整数直接使用其二进制形式表示&#xff0c;所有位都是数值位&#xff0c;没有符号位。例如&#xff0c;一个8位的无符号整数可以表示的范围是从0&#xff08;00000000&#xff09;到255&#xff08;11111111&#xff09;。…

stm32f103调试,程序与定时器同步设置

在调试定时器相关代码时&#xff0c;注意到定时器的中断位总是置1&#xff0c;怀疑代码有问题&#xff0c;经过增大定时器的中断时间&#xff0c;发现定时器与代码调试并不同步&#xff0c;这一点对于调试涉及定时器的代码是非常不利的&#xff0c;这里给出keil调试stm32使定时…

自用Proteus(8.15)常用元器件图示和功能介绍(持续更新...)

文章目录 一、 前言二、新建工程&#xff08;以51单片机流水灯为例&#xff09;2.1 打开软件2.2 建立新工程2.3 创建原理图2.4 不创建PCB布版设计2.5 创建成功2.6 添加元器件2.7 原理图放置完成2.8 编写程序&#xff0c;进行仿真2.9 仿真 三、常用元器件图示和功能介绍3.1 元件…

【回眸】Tessy 单元测试软件使用指南(四)常见报错及解决方案与批量初始化的经验

前言 分析时Tessy的报错 1.fatal error: Tricore/Compilers/Compilers.h: No such file or directory 2.error: #error "Compiler unsupported" 3.warning: invalid suffix on literal;C11 requires a space between literal and string macro 4.error: unknown…

螺蛳壳里做道场:老破机搭建的私人数据中心---Centos下Docker学习01(环境准备)

1 准备工作 由于创建数据中心需要安装很多服务器&#xff0c;这些服务器要耗费很所物理物理计算资源、存储资源、网络资源和软件资源&#xff0c;作为穷学生只有几百块的n手笔记本&#xff0c;不可能买十几台服务器来搭建数据中心&#xff0c;也不愿意跑实验室&#xff0c;想躺…

第十二章--- fixed 和 setprecision 函数、round 函数、进制转换及底层逻辑

1. 保留几位小数 在C中&#xff0c;如果你想要控制输出的小数点后的位数&#xff0c;可以使用<iomanip>头文件提供的fixed和setprecision函数。这里的fixed用于设置浮点数的输出格式为定点表示法&#xff0c;而setprecision(n)则用来指定小数点后保留的位数。具体用法如…

文件上传之%00截断(00截断)以及pikachu靶场

pikachu的文件上传和upload-lab的文件上传 目录 mime type类型 getimagesize 第12关%00截断&#xff0c; 第13关0x00截断 差不多了&#xff0c;今天先学文件上传白名单&#xff0c;在网上看了资料&#xff0c;差不多看懂了&#xff0c;但是还有几个地方需要实验一下&#…

SpringBoot整合异步任务执行

同步任务&#xff1a; 同步任务是在单线程中按顺序执行&#xff0c;每次只有一个任务在执行&#xff0c;不会引发线程安全和数据一致性等 并发问题 同步任务需要等待任务执行完成后才能执行下一个任务&#xff0c;无法同时处理多个任务&#xff0c;响应慢&#xff0c;影响…