Category Archives: How to Fix

INSTALL_FAILED_NO_MATCHING_ABIS solution

The reason I saw this exception on the Internet was that I used Native Lib or JNI or something like that, which is just a messy package related to hardware anyway.
For example, I used an image compression package that involved JNI, and then the above exception occurred when I packaged it.
Solutions:
In the moudle build.gradle file of your app, paste the code in, note the android {} curly braces.

// 解决 native libraries 不支持cpu的体系结构。允许模拟器调试
splits {
    abi {
        enable true
        reset()
        include 'x86', 'armeabi-v7a','x86_64'
        universalApk true
    }
}
--------------------- 
作者:geekqian 
来源:CSDN 
原文:https://blog.csdn.net/geekqian/article/details/79032655 
版权声明:本文为博主原创文章,转载请附上博文链接!

This allows you to run directly into the emulator, but when you do this, multiple ApKs will be generated in the package, so comment out the above code when you release and rebuild the project to package. Remember to always rebuild projects!

Tencent Cloud server encountered “Active: failed (Result: start-limit)” error when starting lightdm

I installed the GUI on Tencent Cloud server and failed to start LightDM:
[root @vm_0_11_centos GDM]# systemctl start lightdm
[root @vm_0_11_centos GDM]# systemctl status lightdm
● lightdm.service-light Display Manager
Loaded: loaded (/usr/lib/systemd/system/lightdm.service; enabled; Vendor presets: enabled)
Active: failed (Result: start-limit) since Sat 2020-04-04 12:02:18 CST; 6s ago
Docs: man:lightdm(1)
Process: 8495 ExecStart=/usr/sbin/lightdm (code=exited, status=1/FAILURE)
Main PID: 8495 (code=exited, status=1/FAILURE)
Apr 04 12:02:17 VM_0_11_centos systemd[1]: Unit lightdm.service entered failed state.
Apr 04 12:02:17 VM_0_11_centos systemd[1]: Triggering OnFailure= dependencies of lightdm.service.
Apr 04 12:02:17 VM_0_11_centos systemd[1]: lightdm.service failed.
Apr 04 12:02:18 VM_0_11_centos systemd[1]: lightdm.service holdoff time over, scheduling restart.
Apr 04 12:02:18 VM_0_11_centos systemd[1]: Stopped Light Display Manager.
Apr 04 12:02:18 VM_0_11_centos systemd[1]: start request repeated too quickly for lightdm.service
Apr 04 12:02:18 VM_0_11_centos systemd[1]: Failed to start Light Display Manager.
Apr 04 12:02:18 VM_0_11_centos systemd[1]: Unit lightdm.service entered failed state.
Apr 04 12:02:18 VM_0_11_centos systemd[1]: Triggering OnFailure= dependencies of lightdm.service.
Apr 04 12:02:18 VM_0_11_centos systemd[1]: lightdm.service failed.
Solution:
because the libdrm version is too low, so just update.
[root @vm_0_11_centos ~]# yum update libdrm
[root @vm_0_11_centos ~]# systemctl start lightdm
[root @vm_0_11_centos ~]# systemctl status lightdm
● lightdm.service-light Display Manager
the Loaded: the Loaded (/ usr/lib/systemd/system/lightdm. Service; enabled; Vendor presets: enabled)
Active: Active (running) since Sat 2020-04-04 22:21:33 CST; 6s ago

My cloud server instance type is a standard SA1, CENTOS 7.5-64-bit system.

‘Conversion failed when converting date and/or time from character string.DB-Lib error message 241,

After connecting to the SqlServer database with pymssql, when inserting a block of data containing the time field into the database, the Conversion error is reported as follows:
‘Conversion failed when converting date and/or time from character string. Db-lib error message 241,
Process:
1, directly in the database to execute the insert statement

INSERT INTO [dbo].[ClustedResult]([outputScript],[classId],[startTime],[endTime]) VALUES(0x76A914E67550CD61C6D89DF67F4D5F8E0B4AD30013C65888AC,'493886f0-7387-11e7-ab02-047d7ba2a507','2017-07-28 19:24:14.431000','2017-07-28 19:24:14.431000')

An error was also reported, indicating that string and date conversion failed.
2, view the data type
of each field in the table: [startTime],[endTime] data type of two fields is datetime
There are 6 data types of sqlserver 2008 representing time on the Internet.
time, date, smalldatetime, datetime, datetime2, datetimeoffset;
Datetime
date and time section, can represent date range from January 1, 1753 AD 00:00:00 000 to December 31, 9999 23:59:59.997, accurate to 3.33 ms, it requires 8 bytes of storage space. The DateTime field type corresponds to the time format of YYyy-Mm-DD HH: MM: Ss.FFF, three F’s, accurate to 1 ms (ms), example 2014-12-03 17:06:15.433
Smalldatetime
date and time data from January 1, 1900 to June 6, 2079 are accurate to minutes. Smalldatetime values of 29.998 seconds or less are rounded down to the closest minute, and SmallDatetime values of 29.999 seconds or more are rounded up to the closest minute. 4 bytes of storage space is required.
Date
SQL Server 2008 newly introduced data type. It represents a date, without a time component, and can represent dates ranging from January 1, A.D., to December 31, 9999. Only three bytes of storage is required.
DateTime2
DateTime2 field type corresponding to the time format is yyyy-mm-dd HH: MM :ss.fffffff, 7 f, accurate to 0.1 microsecond (s), example 2014-12-03 17:23:19.2880929.
The data is read in the same format regardless of whether your field is datetime or SmallDatetime (e.g. 1900-01-01). A datetime doesn’t show its milliseconds, but it does show up in milliseconds during time comparisons, making the time periods not equal.
If it’s SQL Server 2005, use Smalldatetime to get half of the data, even if it doesn’t look any different when queried.
if you are SQL Server 2008, please use date. Although 3 bytes is not much different from 4 bytes, it has greatly improved in design and logical clarity.
If the SQL date function is used for assignment, the DateTime field type is GETDATE() and the DateTime2 field type is SYSDATETIME().
There’s a very detailed reference: http://www.csdn.net/article/1970-01-01/282777

http://blog.csdn.net/justdb/article/details/7575021
3. After a series of knowledge catch up with, look at the characteristics of time types in python

begin = datetime.datetime.now()
print type(begin)
print str(begin)

#运行结果:
<type 'datetime.datetime'>
2017-07-28 19:24:14.431000

4. The reason is that python and sqlserver have different time types: format. Offer two solutions:
Solution 1: Unify the Python Datetime format with the database format.
timeStamp = STR (datetime. Datetime. Now ())[0:-3] scheme 2: modify the database data type to a wider range of datetime2

Solve the problem that the Raspberry Pi cannot start (dependency failed for Local File Systems)

A mobile hard disk was mounted the day before yesterday, so it could not be started yesterday. The following error is reported:
dependency failed for /mnt/my_hd
dependency failed for Local File Systems

Ideas:
Since /dev/sda1 has not been found at boot time and cannot be loaded to report an error, comment out the contents of the fstab file about /dev/sda1 so that it does not work.
Specific solutions:
1, CTRL + D
2. Enter the password yahboom
3. Type:

nano /etc/fstab

4. Add “#” to the first string on the third line

5. CTRL + X, yes (save the file)
6, CTRL + T
7. Select “FSTAB” and press Enter.
8, CTRL + Alt + DELETE, restart.
9. After entering the system, in the console window:

su
mount /dev/sda1 /mnt/my_hd

Problem solving.

! [rejected]master -> master error: failed to push some refs to’https://github.com/ The ultimate solution

Git error:

$ git push -u origin master

To [email protected]:***.git

 ! [rejected]        master -> master (non-fast-forward)

error: failed to push some refs to '[email protected]:***.git

hint: Updates were rejected because the tip of your current branch is behin

hint: its remote counterpart. Integrate the remote changes (e.g.

hint: 'git pull ...') before pushing again.

hint: See the 'Note about fast-forwards' in 'git push --help' for details.

Git already has some code in the repository, so it doesn’t allow you to overwrite your code directly. There are two ways to solve this problem:
method 1: force the code to github warehouse (recommended, save time and effort)

git push -f origin master		//直接强推,即利用强覆盖方式用你本地的代码替代github仓库内的内容

method 2: fetch git’s stuff to your local, merge and push

git fetch
git merge			//这两条命令等价于git pull  
git config branch.master.remote origin  
git config branch.master.merge refs/heads/master  

Then pull git back and git pushes your code. Reference: Here.

Oracle 11gR2 RAC ohasd failed to start solution

CRS-4124: Oracle High Availability Services startup failed.
CRS-4000: Command Start failed, or completed with errors.
ohasd failed to start: Inappropriate ioctl for device
Ohasd failed to start the at/u01/app/11.2.0/grid/CRS/install/rootcrs. Pl line 443. When I installed 11gR2 RAC for the first time, I encountered this classic problem of 11.0.2.1. After checking on the Internet, I realized that it was a bug and the solution was very simple.
Just before root.sh, execute the following command
/bin/dd if=/var/tmp/.oracle/npohasd of=/dev/null bs=1024 count=1
If there is a
/bin/dd: opening`/var/tmp/.oracle/npohasd’: No such file or directory
While the file is still running, it is not Adding a daemon to Inittab until it is ready to run. The DD command is usually executed while Adding a daemon to Inittab.
Another solution is to change file permissions
chown root:oinstall /var/tmp/.oracle/npohasd
To perform root. Don’t forget to delete the configuration before sh:/u01/app/11.2.0/grid/CRS/install/roothas. Pl – deconfig – force – verbose
Reference:
https://cn.forums.oracle.com/forums/thread.jspa?threadID=2350285
http://blog.csdn.net/tianlesoftware/article/details/8207629

Completely solve Mechanism level: Failed to find any Kerberos tgt

Error description
Secure Client Cannot Connect ([Caused by GSSException: No valid credentials provided(Mechanism level: Failed to find any Kerberos tgt)])
symptoms
If it’s not due to the validity of the Klist Keytab, and you return the error, if it’s a resident service, like nohup, Tomcat, etc., there’s a pattern to the error, like 12 o ‘clock every day, or after a certain period of time.
The solution
To test that

https://hbase.apache.org/book.html#trouble.client.security.rpc
https://docs.oracle.com/javase/8/docs/technotes/guides/security/jgss/tutorials/Troubleshooting.html

Reproduced in: https://www.cnblogs.com/slankka/p/10217038.html

Pod reports error “Back-off restarting failed container” solution

Pod error “back-off Restarting Failed Container” solution
Phenomenon:

Events:
  Type     Reason          Age                  From                         Message
  ----     ------          ----                 ----                         -------
  Normal   Scheduled       3m                   default-scheduler            Successfully assigned default/jenkins-master-deploy-6694c4f497-r46fn to master.localdomain
  Normal   SandboxChanged  85s                  kubelet, master.localdomain  Pod sandbox changed, it will be killed and re-created.
  Normal   Pulled          83s (x5 over 2m59s)  kubelet, master.localdomain  Container image "drud/jenkins-master:v0.29.0" already present on machine
  Normal   Created         83s (x5 over 2m59s)  kubelet, master.localdomain  Created container jenkins-master
  Normal   Started         81s (x5 over 2m59s)  kubelet, master.localdomain  Started container jenkins-master
  Warning  BackOff         78s (x9 over 2m57s)  kubelet, master.localdomain  Back-off restarting failed container

Solution:
reference page:

https://serverfault.com/questions/924243/back-off-restarting-failed-container-error-syncing-pod-in-minikube in deployment that mirror followed by the command
command: [“/bin/bash “, “- ce”, “tail -f/dev/null”]

kind: Deployment
apiVersion: apps/v1beta2
metadata:
  labels:
    app: jenkins-master
  name: jenkins-master-deploy
spec:
  replicas: 1
  selector:
    matchLabels:
      app: jenkins-master
  template:
    metadata:
      labels:
        app: jenkins-master
    spec:
      containers:
      - name: jenkins-master
        image: drud/jenkins-master:v0.29.0
        imagePullPolicy: IfNotPresent
        command: [ "/bin/bash", "-ce", "tail -f /dev/null" ]
        volumeMounts:
        - mountPath: /var/jenkins_home/
          name: masterjkshome
        ports:
        - containerPort: 8080
      volumes:
      - name: masterjkshome
        persistentVolumeClaim:
          claimName: pvcjkshome

 

Building wheel for wrapt (setup.py) … error

Go here
here
find corresponding error uninstalled library WHL file to download
PIP command to install
take me for example wrapt

C:\Windows\system32>pip install C:\Users\88304\Desktop\wrapt-1.11.2-cp36-cp36m-win_amd64.whl
Processing c:\users\88304\desktop\wrapt-1.11.2-cp36-cp36m-win_amd64.whl
Installing collected packages: wrapt
Successfully installed wrapt-1.11.2

C:\Windows\system32>pip install -i https://pypi.douban.com/simple/ tensorflow
Looking in indexes: https://pypi.douban.com/simple/
Collecting tensorflow
  Downloading https://pypi.doubanio.com/packages/d3/af/296748d4c8d8987423231b93aecce5ab5952f6f2243cb6cedb88dd425397/tensorflow-2.0.0-cp36-cp36m-win_amd64.whl (48.1MB)
     |████████████████████████████████| 48.1MB 113kB/s
Requirement already satisfied: google-pasta>=0.1.6 in c:\program files\python36\lib\site-packages (from tensorflow) (0.1.8)
Requirement already satisfied: wheel>=0.26 in c:\program files\python36\lib\site-packages (from tensorflow) (0.33.6)
Requirement already satisfied: absl-py>=0.7.0 in c:\program files\python36\lib\site-packages (from tensorflow) (0.8.1)
Requirement already satisfied: grpcio>=1.8.6 in c:\program files\python36\lib\site-packages (from tensorflow) (1.25.0)
Requirement already satisfied: opt-einsum>=2.3.2 in c:\program files\python36\lib\site-packages (from tensorflow) (3.1.0)
Requirement already satisfied: wrapt>=1.11.1 in c:\program files\python36\lib\site-packages (from tensorflow) (1.11.2)
Requirement already satisfied: tensorboard<2.1.0,>=2.0.0 in c:\program files\python36\lib\site-packages (from tensorflow) (2.0.2)
Requirement already satisfied: gast==0.2.2 in c:\program files\python36\lib\site-packages (from tensorflow) (0.2.2)
Requirement already satisfied: numpy<2.0,>=1.16.0 in c:\program files\python36\lib\site-packages (from tensorflow) (1.17.4)
Requirement already satisfied: six>=1.10.0 in c:\program files\python36\lib\site-packages (from tensorflow) (1.13.0)
Requirement already satisfied: termcolor>=1.1.0 in c:\program files\python36\lib\site-packages (from tensorflow) (1.1.0)
Requirement already satisfied: tensorflow-estimator<2.1.0,>=2.0.0 in c:\program files\python36\lib\site-packages (from tensorflow) (2.0.1)
Requirement already satisfied: astor>=0.6.0 in c:\program files\python36\lib\site-packages (from tensorflow) (0.8.0)
Requirement already satisfied: keras-applications>=1.0.8 in c:\program files\python36\lib\site-packages (from tensorflow) (1.0.8)
Requirement already satisfied: protobuf>=3.6.1 in c:\program files\python36\lib\site-packages (from tensorflow) (3.11.1)
Requirement already satisfied: keras-preprocessing>=1.0.5 in c:\program files\python36\lib\site-packages (from tensorflow) (1.1.0)
Requirement already satisfied: google-auth<2,>=1.6.3 in c:\program files\python36\lib\site-packages (from tensorboard<2.1.0,>=2.0.0->tensorflow) (1.7.2)
Requirement already satisfied: requests<3,>=2.21.0 in c:\program files\python36\lib\site-packages (from tensorboard<2.1.0,>=2.0.0->tensorflow) (2.22.0)
Requirement already satisfied: markdown>=2.6.8 in c:\program files\python36\lib\site-packages (from tensorboard<2.1.0,>=2.0.0->tensorflow) (3.1.1)
Requirement already satisfied: setuptools>=41.0.0 in c:\program files\python36\lib\site-packages (from tensorboard<2.1.0,>=2.0.0->tensorflow) (42.0.2)
Requirement already satisfied: google-auth-oauthlib<0.5,>=0.4.1 in c:\program files\python36\lib\site-packages (from tensorboard<2.1.0,>=2.0.0->tensorflow) (0.4.1)
Requirement already satisfied: werkzeug>=0.11.15 in c:\program files\python36\lib\site-packages (from tensorboard<2.1.0,>=2.0.0->tensorflow) (0.16.0)
Requirement already satisfied: h5py in c:\program files\python36\lib\site-packages (from keras-applications>=1.0.8->tensorflow) (2.10.0)
Requirement already satisfied: pyasn1-modules>=0.2.1 in c:\program files\python36\lib\site-packages (from google-auth<2,>=1.6.3->tensorboard<2.1.0,>=2.0.0->tensorflow) (0.2.7)
Requirement already satisfied: cachetools<3.2,>=2.0.0 in c:\program files\python36\lib\site-packages (from google-auth<2,>=1.6.3->tensorboard<2.1.0,>=2.0.0->tensorflow) (3.1.1)
Requirement already satisfied: rsa<4.1,>=3.1.4 in c:\program files\python36\lib\site-packages (from google-auth<2,>=1.6.3->tensorboard<2.1.0,>=2.0.0->tensorflow) (4.0)
Requirement already satisfied: idna<2.9,>=2.5 in c:\program files\python36\lib\site-packages (from requests<3,>=2.21.0->tensorboard<2.1.0,>=2.0.0->tensorflow) (2.8)
Requirement already satisfied: chardet<3.1.0,>=3.0.2 in c:\program files\python36\lib\site-packages (from requests<3,>=2.21.0->tensorboard<2.1.0,>=2.0.0->tensorflow) (3.0.4)
Requirement already satisfied: urllib3!=1.25.0,!=1.25.1,<1.26,>=1.21.1 in c:\program files\python36\lib\site-packages (from requests<3,>=2.21.0->tensorboard<2.1.0,>=2.0.0->tensorflow) (1.25.7)
Requirement already satisfied: certifi>=2017.4.17 in c:\program files\python36\lib\site-packages (from requests<3,>=2.21.0->tensorboard<2.1.0,>=2.0.0->tensorflow) (2019.11.28)
Requirement already satisfied: requests-oauthlib>=0.7.0 in c:\program files\python36\lib\site-packages (from google-auth-oauthlib<0.5,>=0.4.1->tensorboard<2.1.0,>=2.0.0->tensorflow) (1.3.0)
Requirement already satisfied: pyasn1<0.5.0,>=0.4.6 in c:\program files\python36\lib\site-packages (from pyasn1-modules>=0.2.1->google-auth<2,>=1.6.3->tensorboard<2.1.0,>=2.0.0->tensorflow) (0.4.8)
Requirement already satisfied: oauthlib>=3.0.0 in c:\program files\python36\lib\site-packages (from requests-oauthlib>=0.7.0->google-auth-oauthlib<0.5,>=0.4.1->tensorboard<2.1.0,>=2.0.0->tensorflow) (3.1.0)
Installing collected packages: tensorflow
Successfully installed tensorflow-2.0.0