ERROR = the distribution-provided pre-install script failed! in installing driver for 1660ti

Hello :)

Am trying trying to install the driver for my new card but am getting tons of obstacles that I have solved but now am stuck at that error

the distribution-provided pre-install script failed!

these are the commands that i have used so far and am stuck at that error

Hit Ctrl+Alt+F1 and login using your credentials.
kill your current X server session by typing sudo service lightdm stop or sudo lightdm stop
Enter runlevel 3 by typing sudo init 3
Install your .run file. you change to the directory where you have downloaded the file by typing for instance cd Downloads. If it is in another directory, go there. Check if you see the file when you type ls NVIDIA Make the file executable with chmod +x ./ Execute the file with sudo ./
You might be required to reboot when the installation finishes. If not, run sudo service lightdm start or sudo start lightdm to start your X server again.
It’s worth mentioning, that when installed this way, you’d have to redo the steps after each kernel update.

that is where i get the error after i do the command sudo ./ = the distribution-provided pre-install script failed!

then i do not know how to get out of there to come back so i must restart my computer

so am stuck in the terminal and at the installation

and this is my system info

ladydragon@ladydragon-System-Product-Name:~$ inxi -Fxz
System: Host: ladydragon-System-Product-Name Kernel: 4.15.0-47-generic x86_64 bits: 64 gcc: 7.3.0
Desktop: Cinnamon 3.8.9 (Gtk 3.22.30-1ubuntu2) Distro: Linux Mint 19 Tara
Machine: Device: desktop Mobo: ASUSTeK model: PRIME Z370-A v: Rev X.0x serial: N/A
UEFI [Legacy]: American Megatrends v: 1002 date: 07/02/2018
CPU: 6 core Intel Core i7-8700 (-MT-MCP-) arch: Skylake rev.10 cache: 12288 KB
flags: (lm nx sse sse2 sse3 sse4_1 sse4_2 ssse3 vmx) bmips: 38304
clock speeds: max: 4600 MHz 1: 3436 MHz 2: 3922 MHz 3: 3893 MHz 4: 3668 MHz 5: 3510 MHz 6: 3897 MHz
7: 3776 MHz 8: 3621 MHz 9: 4056 MHz 10: 3729 MHz 11: 3927 MHz 12: 3826 MHz
Graphics: Card-1: Intel Device 3e92 bus-ID: 00:02.0
Card-2: NVIDIA Device 2182 bus-ID: 01:00.0
Display Server: x11 (X.Org 1.19.6 ) drivers: modesetting (unloaded: fbdev,vesa)
Resolution: 1920x1080@60.00hz
OpenGL: renderer: Mesa DRI Intel UHD Graphics 630 (Coffeelake 3x8 GT2)
version: 4.5 Mesa 18.2.8 Direct Render: Yes
Audio: Card-1 Intel 200 Series PCH HD Audio driver: snd_hda_intel bus-ID: 00:1f.3
Card-2 NVIDIA Device 1aeb driver: snd_hda_intel bus-ID: 01:00.1
Sound: Advanced Linux Sound Architecture v: k4.15.0-47-generic
Network: Card: Intel Ethernet Connection (2) I219-V driver: e1000e v: 3.2.6-k bus-ID: 00:1f.6
IF: enp0s31f6 state: up speed: 1000 Mbps duplex: full mac:
Drives: HDD Total Size: 2240.5GB (67.6% used)
ID-1: /dev/nvme0n1 model: KINGSTON_SA1000M8240G size: 240.1GB
ID-2: /dev/sda model: WDC_WD2005FBYZ size: 2000.4GB
Partition: ID-1: / size: 1.8T used: 1.4T (82%) fs: ext4 dev: /dev/sda1
RAID: No RAID devices: /proc/mdstat, md_mod kernel module present
Sensors: System Temperatures: cpu: 29.8C mobo: 27.8C
Fan Speeds (in rpm): cpu: 0
Info: Processes: 306 Uptime: 4:39 Memory: 5305.2/48158.0MB Init: systemd runlevel: 5 Gcc sys: 7.3.0
Client: Shell (bash 4.4.191) inxi: 2.3.56

Can someone help me please thank you in advance :)
It’s a safety measure so that you don’t use the .run installer and possibly break your system.
To install the driver, please use the Ubuntu provided package (from Software&Drivers application) or add the Ubuntu graphics ppa
and install the driver from that (sudo apt install nvidia-driver-418)
Please make sure that secure boot is disabled in bios.