Author Archives: Robins

[Redirect anomaly] Cannot call sendRedirect() after the response has been committed

Exception: threw exception [request processing failed; nested exception is java.lang.IllegalStateException: Cannot call sendRedirect() after the response has been committed] with root cause
java.lang.IllegalStateException: Cannot call sendRedirect() after the response has been committed

Reason:
there is no return after response reset. The subsequent program continues to run and submits the request again, so an error is reported,

When forwarding or redirecting according to conditions, the corresponding forwarding or redirecting statement is followed by return; Or return null;

When using iView, report: no parsing error parsing error: x-invalid-end-tag solution

When using Iview, it reports: https://google.com/#q=vue%2Fno-parsing-error Parsing error: x-invalid-end-tag Solution
Phenomenon

✘  https://google.com/#q=vue%2Fno-parsing-error  Parsing error: x-invalid-end-tag
  src\pages\TheAdminDashboard.vue:11:25
                          </MenuItem>

Solution:

There are two solutions:
1. Modify MenuItem to: menu item 2

2. Add the following in the root directory. Eslintrc.js file rules:

"vue/no-parsing-error": [2, { "x-invalid-end-tag": false }]

Plt.acorr() Function Error: ValueError: object too deep for desired array

sketch

Note that the input data needs to be one-dimensional. Otherwise, it’s strange to report an error( Don’t ask me why I know)

Correct code:

import matplotlib.pyplot as plt
import numpy as np
data = np.random.random(100)
plt.acorr(data)
plt.show()

Error code:

import matplotlib.pyplot as plt
import numpy as np
data = np.random.random((1, 100))
plt.acorr(data)
plt.show()

Android: Can’t create handler inside thread that has not called Looper.prepare() [Solved]

Error reason:

You can't refresh the UI thread in a subthread in Android

resolvent:

//Refresh the UI using the runOnUiThread method
runOnUiThread(new Runnable() {
    @Override
    public void run() {
        //refresh UI
    }
});

common problem:

When calling locationmanager to get the current location information and upload it in real time, the reason for this error is that locationmanager needs to be used in the main thread. The following methods are recommended:

@Override
protected void onCreate(Bundle savedInstanceState) {    
    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_main);

    //upload location messages
    Button btnUploadGPS = (Button)findViewById(R.id.btn_upload_gps);
    if (btnUploadGPS != null){
        btnUploadGPS .setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                uploadGPS();
            }
        });
    }
}

private void uploadGPS(){    
    final LocationManager locationManager = (LocationManager) getSystemService(Context.LOCATION_SERVICE);
    Location location = locationManager.getLastKnownLocation(LocationManager.GPS_PROVIDER);
    locationManager.requestLocationUpdates(
            LocationManager.GPS_PROVIDER,
            2000,
            (float) 0.01,
            new LocationListener() {
                @Override
                public void onLocationChanged(Location location) {
                    asyncUploadGPS(location);
                }

                @Override
                public void onStatusChanged(String provider, int status, Bundle extras) {

                }

                @Override
                public void onProviderEnabled(String provider) {
                    asyncUploadGPS(locationManager.getLastKnownLocation(provider));
                }

                @Override
                public void onProviderDisabled(String provider) {
                    asyncUploadGPS(null);
                }
            }
    );
}

private void asyncUploadGPS(final Location currentLocation) {
    new Thread(new Runnable() {
        @Override
        public void run() {
            //upload loacation messages
        }
    }).start();
}

Python TypeError: not all arguments converted during string formatting [Solved]

For example:

 strs=(1,2,3,4)  #Create a collection
 strs
 (1, 2, 3,4)
 >>> print 'strs= %s ' % strs
 Traceback (most recent call last):
   File "<pyshell#43>", line 1, in <module>
     print 'strs= %s ' % str
 TypeError: not all arguments converted during string formatting

Reason: the 1% operator can only be used directly for string (‘123 ‘). If it is a list ([1,2,3]) or tuple, it needs to match operators one by one.

To put it bluntly, it’s written in parentheses with commas (STRs,)

Solution:

print 'strs= %s' % (strs,)
strs= (1, 2, 3,4)
or
print 'strs= %s,%s,%s,%s' % sstr
strs= 1,2,3,4 

# simple explanation
the% before and after explanation does not correspond to the number of parameters after explanation, such as

File "<pyshell#37>", line 1, in <module>
print '%f meters is the same as &f km' % (meters, kilometers)
TypeError: not all arguments converted during string formatting

There are two parameters of miles and kilometer in the back, only one% F in the front, and one & amp; with wrong print;, The former is inconsistent with the latter; If you change it to

print '%f miles is the same as %f km' % (miles, kilometers)

That’s all

[Solved] TypeError: not all arguments converted during string formatting

When formatting the output of a string, one of the methods is as follows:

for value in ['A', 'B', 'C']:
    print('output: %s' % value)

When I print the running status of the sub process, print() I found several strings in the list, but the error is as follows:

TypeError: not all arguments converted during string formatting

Not all the parameters are converted during the string formatting period. I looked at the location of the error. It turned out that % was wrongly typed, and it became $, and I didn’t know the reason at first. I saw this error for the first time and sent this information to everyone for reference. This is a low-level mistake

Supplement: several ways of string output

Direct print() output

print('str1', 'str2', 'str3', '...')

'%s' % value Placeholder output

# 1. Single
>>> name = 'Jason'
>>> print('name: %s' % name)
name: Jason
# 2.Multiple
>>> name1, name2 = 'Jason', 'Bob'
>>> print('name1: %s; name2: %s' % (name1, name2))
name1:, Jason; name2: Bob
# Output order can also be customized
>>> print('name1: %s; name2: %s' % (name2, name1))
name1: Bob; name2: Jason

When outputting multiple string variables, multiple variables after % need to be enclosed in parentheses, otherwise the error of insufficient parameters will be reported

TypeError: not enough arguments for format string

format() format output

# 1. Single
>>> '{}'.format('world')
'world'
# 2. Multiple
>>> word1, word2 = 'hello', 'world'
>>> hello_world = '{}, {}'.format(word1, word2)
>>> hello_world
'hello, world'
# Output order can also be customized
>>> hello_world = '{1}, {1}'.format(word1, word2)
>>> hello_world
'world, world'

When output at specified position, all {} must have subscripts of parameters, otherwise it will not be able to convert from manual field number to automatic field number valueerror error:

ValueError: cannot switch from manual field specification to automatic field numbering

It must also be within the subscript range, otherwise an overrun indexerror error will be reported

IndexError: Replacement index 2 out of range for positional args tuple

JAVA Connect MYSQL Error: Path does not chain with any of the trust anchors

Connection address:

jdbcUrl=jdbc:mysql://127.0.0.1:3306/test?characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true

There is no problem with MySQL 5.5 on windows, but the connection fails on Mac.

Maybe it’s a certificate problem. Just change usessl = true to usessl = false. If you have time, please study SSL connection.

The error information is as follows:

Warning: Exception starting filter JFinalFilter
java.lang.RuntimeException: Plugin start error: com.jfinal.plugin.activerecord.ActiveRecordPlugin. 
com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: Communications link failure

The last packet successfully received from the server was 316 milliseconds ago.  The last packet sent successfully to the server was 309 milliseconds ago.
	at com.jfinal.core.Config.startPlugins(Config.java:116)
	at com.jfinal.core.Config.configJFinal(Config.java:51)
	at com.jfinal.core.JFinal.init(JFinal.java:63)
	at com.jfinal.core.JFinalFilter.init(JFinalFilter.java:49)
	at org.apache.catalina.core.ApplicationFilterConfig.initFilter(ApplicationFilterConfig.java:285)
	at org.apache.catalina.core.ApplicationFilterConfig.getFilter(ApplicationFilterConfig.java:266)
	at org.apache.catalina.core.ApplicationFilterConfig.<init>(ApplicationFilterConfig.java:108)
	at org.apache.catalina.core.StandardContext.filterStart(StandardContext.java:4747)
	at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5389)
	at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:145)
	at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1410)
	at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1400)
	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
	at java.lang.Thread.run(Thread.java:748)
Caused by: com.jfinal.plugin.activerecord.ActiveRecordException: com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: Communications link failure

The last packet successfully received from the server was 316 milliseconds ago.  The last packet sent successfully to the server was 309 milliseconds ago.
	at com.jfinal.plugin.activerecord.TableBuilder.build(TableBuilder.java:55)
	at com.jfinal.plugin.activerecord.ActiveRecordPlugin.start(ActiveRecordPlugin.java:226)
	at com.jfinal.core.Config.startPlugins(Config.java:107)
	... 15 more
Caused by: com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: Communications link failure

The last packet successfully received from the server was 316 milliseconds ago.  The last packet sent successfully to the server was 309 milliseconds ago.
	at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
	at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
	at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
	at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
	at com.mysql.jdbc.Util.handleNewInstance(Util.java:425)
	at com.mysql.jdbc.SQLError.createCommunicationsException(SQLError.java:989)
	at com.mysql.jdbc.ExportControlled.transformSocketToSSLSocket(ExportControlled.java:203)
	at com.mysql.jdbc.MysqlIO.negotiateSSLConnection(MysqlIO.java:4901)
	at com.mysql.jdbc.MysqlIO.proceedHandshakeWithPluggableAuthentication(MysqlIO.java:1659)
	at com.mysql.jdbc.MysqlIO.doHandshake(MysqlIO.java:1226)
	at com.mysql.jdbc.ConnectionImpl.coreConnect(ConnectionImpl.java:2191)
	at com.mysql.jdbc.ConnectionImpl.connectOneTryOnly(ConnectionImpl.java:2222)
	at com.mysql.jdbc.ConnectionImpl.createNewIO(ConnectionImpl.java:2017)
	at com.mysql.jdbc.ConnectionImpl.<init>(ConnectionImpl.java:779)
	at com.mysql.jdbc.JDBC4Connection.<init>(JDBC4Connection.java:47)
	at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
	at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
	at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
	at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
	at com.mysql.jdbc.Util.handleNewInstance(Util.java:425)
	at com.mysql.jdbc.ConnectionImpl.getInstance(ConnectionImpl.java:389)
	at com.mysql.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java:330)
	at com.alibaba.druid.pool.DruidAbstractDataSource.createPhysicalConnection(DruidAbstractDataSource.java:1461)
	at com.alibaba.druid.pool.DruidAbstractDataSource.createPhysicalConnection(DruidAbstractDataSource.java:1525)
	at com.alibaba.druid.pool.DruidDataSource.init(DruidDataSource.java:734)
	at com.alibaba.druid.pool.DruidDataSource.getConnection(DruidDataSource.java:1060)
	at com.alibaba.druid.pool.DruidDataSource.getConnection(DruidDataSource.java:1056)
	at com.alibaba.druid.pool.DruidDataSource.getConnection(DruidDataSource.java:104)
	at com.jfinal.plugin.activerecord.TableBuilder.build(TableBuilder.java:43)
	... 17 more
Caused by: javax.net.ssl.SSLHandshakeException: java.security.cert.CertificateException: java.security.cert.CertPathValidatorException: Path does not chain with any of the trust anchors
	at sun.security.ssl.Alerts.getSSLException(Alerts.java:192)
	at sun.security.ssl.SSLSocketImpl.fatal(SSLSocketImpl.java:1964)
	at sun.security.ssl.Handshaker.fatalSE(Handshaker.java:328)
	at sun.security.ssl.Handshaker.fatalSE(Handshaker.java:322)
	at sun.security.ssl.ClientHandshaker.serverCertificate(ClientHandshaker.java:1614)
	at sun.security.ssl.ClientHandshaker.processMessage(ClientHandshaker.java:216)
	at sun.security.ssl.Handshaker.processLoop(Handshaker.java:1052)
	at sun.security.ssl.Handshaker.process_record(Handshaker.java:987)
	at sun.security.ssl.SSLSocketImpl.readRecord(SSLSocketImpl.java:1072)
	at sun.security.ssl.SSLSocketImpl.performInitialHandshake(SSLSocketImpl.java:1385)
	at sun.security.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:1413)
	at sun.security.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:1397)
	at com.mysql.jdbc.ExportControlled.transformSocketToSSLSocket(ExportControlled.java:188)
	... 39 more
Caused by: java.security.cert.CertificateException: java.security.cert.CertPathValidatorException: Path does not chain with any of the trust anchors
	at com.mysql.jdbc.ExportControlled$X509TrustManagerWrapper.checkServerTrusted(ExportControlled.java:304)
	at sun.security.ssl.AbstractTrustManagerWrapper.checkServerTrusted(SSLContextImpl.java:985)
	at sun.security.ssl.ClientHandshaker.serverCertificate(ClientHandshaker.java:1596)
	... 47 more
Caused by: java.security.cert.CertPathValidatorException: Path does not chain with any of the trust anchors
	at sun.security.provider.certpath.PKIXCertPathValidator.validate(PKIXCertPathValidator.java:154)
	at sun.security.provider.certpath.PKIXCertPathValidator.engineValidate(PKIXCertPathValidator.java:80)
	at java.security.cert.CertPathValidator.validate(CertPathValidator.java:292)
	at com.mysql.jdbc.ExportControlled$X509TrustManagerWrapper.checkServerTrusted(ExportControlled.java:297)
	... 49 more

六月 03, 2018 12:36:57 下午 org.apache.catalina.core.StandardContext startInternal
严重: One or more Filters failed to start. Full details will be found in the appropriate container log file
六月 03, 2018 12:36:57 下午 org.apache.catalina.core.StandardContext startInternal
严重: Context [/youpai] startup failed due to previous errors
六月 03, 2018 12:36:57 下午 org.apache.catalina.loader.WebappClassLoaderBase clearReferencesJdbc
警告: The web application [youpai] registered the JDBC driver [com.alibaba.druid.proxy.DruidDriver] but failed to unregister it when the web application was stopped. To prevent a memory leak, the JDBC Driver has been forcibly unregistered.
六月 03, 2018 12:36:57 下午 org.apache.catalina.loader.WebappClassLoaderBase clearReferencesJdbc
警告: The web application [youpai] registered the JDBC driver [com.mysql.jdbc.Driver] but failed to unregister it when the web application was stopped. To prevent a memory leak, the JDBC Driver has been forcibly unregistered.
六月 03, 2018 12:36:57 下午 org.apache.catalina.loader.WebappClassLoaderBase clearReferencesThreads
警告: The web application [youpai] appears to have started a thread named [Abandoned connection cleanup thread] but has failed to stop it. This is very likely to create a memory leak. Stack trace of thread:
 java.lang.Object.wait(Native Method)
 java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:143)
 com.mysql.jdbc.AbandonedConnectionCleanupThread.run(AbandonedConnectionCleanupThread.java:64)
 java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
 java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
 java.lang.Thread.run(Thread.java:748)
六月 03, 2018 12:36:57 下午 org.apache.catalina.loader.WebappClassLoaderBase clearReferencesThreads
警告: The web application [youpai] appears to have started a thread named [Druid-ConnectionPool-Create-683007923] but has failed to stop it. This is very likely to create a memory leak. Stack trace of thread:
 java.net.SocketInputStream.socketRead0(Native Method)
 java.net.SocketInputStream.socketRead(SocketInputStream.java:116)
 java.net.SocketInputStream.read(SocketInputStream.java:171)
 java.net.SocketInputStream.read(SocketInputStream.java:141)
 sun.security.ssl.InputRecord.readFully(InputRecord.java:465)
 sun.security.ssl.InputRecord.read(InputRecord.java:503)
 sun.security.ssl.SSLSocketImpl.readRecord(SSLSocketImpl.java:983)
 sun.security.ssl.SSLSocketImpl.performInitialHandshake(SSLSocketImpl.java:1385)
 sun.security.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:1413)
 sun.security.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:1397)
 com.mysql.jdbc.ExportControlled.transformSocketToSSLSocket(ExportControlled.java:188)
 com.mysql.jdbc.MysqlIO.negotiateSSLConnection(MysqlIO.java:4901)
 com.mysql.jdbc.MysqlIO.proceedHandshakeWithPluggableAuthentication(MysqlIO.java:1659)
 com.mysql.jdbc.MysqlIO.doHandshake(MysqlIO.java:1226)
 com.mysql.jdbc.ConnectionImpl.coreConnect(ConnectionImpl.java:2191)
 com.mysql.jdbc.ConnectionImpl.connectOneTryOnly(ConnectionImpl.java:2222)
 com.mysql.jdbc.ConnectionImpl.createNewIO(ConnectionImpl.java:2017)
 com.mysql.jdbc.ConnectionImpl.<init>(ConnectionImpl.java:779)
 com.mysql.jdbc.JDBC4Connection.<init>(JDBC4Connection.java:47)
 sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
 sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
 sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
 java.lang.reflect.Constructor.newInstance(Constructor.java:423)
 com.mysql.jdbc.Util.handleNewInstance(Util.java:425)
 com.mysql.jdbc.ConnectionImpl.getInstance(ConnectionImpl.java:389)
 com.mysql.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java:330)
 com.alibaba.druid.pool.DruidAbstractDataSource.createPhysicalConnection(DruidAbstractDataSource.java:1461)
 com.alibaba.druid.pool.DruidAbstractDataSource.createPhysicalConnection(DruidAbstractDataSource.java:1525)
 com.alibaba.druid.pool.DruidDataSource$CreateConnectionThread.run(DruidDataSource.java:2100)
六月 03, 2018 12:36:57 下午 org.apache.catalina.loader.WebappClassLoaderBase clearReferencesThreads
警告: The web application [youpai] appears to have started a thread named [Druid-ConnectionPool-Destroy-683007923] but has failed to stop it. This is very likely to create a memory leak. Stack trace of thread:
 java.lang.Thread.sleep(Native Method)
 com.alibaba.druid.pool.DruidDataSource$DestroyConnectionThread.run(DruidDataSource.java:2172)
六月 03, 2018 12:36:57 下午 org.apache.catalina.loader.WebappClassLoaderBase checkThreadLocalMapForLeaks
严重: The web application [youpai] created a ThreadLocal with key of type [com.jfinal.template.io.WriterBuffer$2] (value [com.jfinal.template.io.WriterBuffer$2@5d2725f4]) and a value of type [com.jfinal.template.io.CharWriter] (value [com.jfinal.template.io.CharWriter@21b9a650]) but failed to remove it when the web application was stopped. Threads are going to be renewed over time to try and avoid a probable memory leak.
六月 03, 2018 12:36:57 下午 org.apache.catalina.loader.WebappClassLoaderBase checkThreadLocalMapForLeaks
严重: The web application [youpai] created a ThreadLocal with key of type [com.jfinal.template.io.WriterBuffer$3] (value [com.jfinal.template.io.WriterBuffer$3@38a0d534]) and a value of type [com.jfinal.template.io.FastStringWriter] (value []) but failed to remove it when the web application was stopped. Threads are going to be renewed over time to try and avoid a probable memory leak.
六月 03, 2018 12:36:57 下午 org.apache.coyote.AbstractProtocol start
信息: Starting ProtocolHandler ["http-nio-2018"]
六月 03, 2018 12:36:57 下午 org.apache.coyote.AbstractProtocol start
信息: Starting ProtocolHandler ["ajp-nio-8009"]
六月 03, 2018 12:36:57 下午 org.apache.catalina.startup.Catalina start
信息: Server startup in 9062 ms
六月 03, 2018 12:37:01 下午 org.apache.catalina.loader.WebappClassLoaderBase checkStateForResourceLoading
信息: Illegal access: this web application instance has been stopped already. Could not load []. The following stack trace is thrown for debugging purposes as well as to attempt to terminate the thread which caused the illegal access.
java.lang.IllegalStateException: Illegal access: this web application instance has been stopped already. Could not load []. The following stack trace is thrown for debugging purposes as well as to attempt to terminate the thread which caused the illegal access.
	at org.apache.catalina.loader.WebappClassLoaderBase.checkStateForResourceLoading(WebappClassLoaderBase.java:1372)
	at org.apache.catalina.loader.WebappClassLoaderBase.getResource(WebappClassLoaderBase.java:1042)
	at com.mysql.jdbc.AbandonedConnectionCleanupThread.checkContextClassLoaders(AbandonedConnectionCleanupThread.java:90)
	at com.mysql.jdbc.AbandonedConnectionCleanupThread.run(AbandonedConnectionCleanupThread.java:63)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
	at java.lang.Thread.run(Thread.java:748)

Path does not chain with any of the trust anchors [Solved]

Path does not chain with any of the trust anchors exception resolution

Problem statement: JDBC. Url = JDBC: mysql://192.168.23.129:3306/ssmbuild?useSSL=true&amp ; useUnicode=true& Characterencoding = utf8
solution: change usessl = true to usessl = false
reason: according to the requirements of MySQL 5.5.45 +, 5.6.26 + and 5.7.6 +, for data security and maintenance, if you do not set explicit options, you must establish a default SSL connection (true), change it to false and turn it off

Prompt “entering emergency mode. Exit the shell to continue” if the Linux operating system does not start normally

It is an Aliyun ecs server, and the following information is seen through vnc login, entering rescue mode.
Generating “/run/initramfs/rdsosreport.txt”
“Entering emergency mode. Exit the shell to continue”
“Type ‘journalctl’ to view system log.”
You might want to save “/run/initramfs/rdsosreport.txt” to a USB stick or /boot after mounting them and attach it to a bug report.

journalctl warning: /dev/vda1 contains a file system with errors,check forced
fsck failed with error code 4.
Failed to start FIle System Check on /dev/disk/by-uuid/xxx
Dependency failed for /sysroot.
And many other errors, it is impossible to see to which part of the operating system boots into the rescue mode!

1. execute fsck -y /dev/vda1 under :/#, there is fsck command, prompt /dev/vda1 is mounted

2, the directory umount off, reboot again can enter the system normally

Centos7 Start Error: Entering emergency mode.Exit the shell to continue

Centos7 start error: Entering emergency mode.Exit the shell to continue

input journalctl

journalctl

Then keep pressing the space bar to jump to the last page to see the red part in the figure below. Check the content in brackets behind XFS to see whether it is sda2 or sda3

My name is sda2

Input: XFS_ repair -v -L /dev/sda2

xfs_repair -v -L /dev/sda2

After the repair, enter reboot to restart

reboot

When installing software in Ubuntu, it prompts: E: You don’t have enough free space in /var/cache/apt/archives/.

There is not enough free space in/var/cache/apt/Archives /. The tips are as follows:


/The files in var/cache/apt/Archives folder are the installation files downloaded when using sudo apt get install appName. These files can be cleaned up. If you are short of system space, you can think of cleaning up from here to get space. The files under my computer are as follows:

linuxidc@ubuntu :~/linuxidc.com$ cd /var/cache/apt/archives
linuxidc@ubuntu :/var/cache/apt/archives$ ls

The cleaning method is simple:

linuxidc@ubuntu :/var/cache/apt/archives$ sudo apt-get clean
[sudo] password for linuxidc:

When you look again, *. DEB file does not exist